mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 11:03:54 -07:00
Prevent login error handler being incorrectly called (#2176)
In some situations, when the server disconnects the client during a login, multiple dialogs will be shown. This is undesirable behavior, and hence `loginError` should only be called when the client is actually connected (`response.response_code() != Response::RespNotConnected`).
This commit is contained in:
parent
a7a0ea23ca
commit
6825486776
1 changed files with 2 additions and 2 deletions
|
|
@ -152,7 +152,7 @@ void RemoteClient::loginResponse(const Response &response)
|
||||||
if (resp.missing_features_size() > 0 && settingsCache->getNotifyAboutUpdates())
|
if (resp.missing_features_size() > 0 && settingsCache->getNotifyAboutUpdates())
|
||||||
emit notifyUserAboutUpdate();
|
emit notifyUserAboutUpdate();
|
||||||
|
|
||||||
} else {
|
} else if (response.response_code() != Response::RespNotConnected) {
|
||||||
QList<QString> missingFeatures;
|
QList<QString> missingFeatures;
|
||||||
if (resp.missing_features_size() > 0) {
|
if (resp.missing_features_size() > 0) {
|
||||||
for (int i = 0; i < resp.missing_features_size(); ++i)
|
for (int i = 0; i < resp.missing_features_size(); ++i)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue