fix client crash when server goes down during registration (#5787)

This commit is contained in:
ebbit1q 2025-04-12 05:01:14 +02:00 committed by GitHub
parent 3b758962e4
commit 9463390e80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -339,6 +339,11 @@ void RemoteClient::registerResponse(const Response &response)
emit registerAcceptedNeedsActivate();
doLogin();
break;
case Response::RespNotConnected:
// this response is created by the client from doDisconnectFromServer, do not call it again!
emit registerError(response.response_code(), QString::fromStdString(resp.denied_reason_str()),
static_cast<quint32>(resp.denied_end_time()));
break;
default:
emit registerError(response.response_code(), QString::fromStdString(resp.denied_reason_str()),
static_cast<quint32>(resp.denied_end_time()));