Refactor scrobbler authentication code

Fix a crash when authentication is cancelled
This commit is contained in:
Jonas Kvinge
2019-11-14 21:07:30 +01:00
parent 1862e70628
commit a9accb7d85
6 changed files with 104 additions and 65 deletions

View File

@@ -52,7 +52,9 @@ LocalRedirectServer::LocalRedirectServer(const bool https, QObject *parent)
socket_(nullptr)
{}
LocalRedirectServer::~LocalRedirectServer() {}
LocalRedirectServer::~LocalRedirectServer() {
if (isListening()) close();
}
bool LocalRedirectServer::GenerateCertificate() {