diff options
-rw-r--r-- | protocols/Discord/src/connection.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/Discord/src/connection.cpp b/protocols/Discord/src/connection.cpp index 2fe771c0ed..96cc32ee25 100644 --- a/protocols/Discord/src/connection.cpp +++ b/protocols/Discord/src/connection.cpp @@ -104,7 +104,9 @@ void CDiscordProto::ShutdownSession() void CDiscordProto::ConnectionFailed(int iReason)
{
debugLogA("CDiscordProto::ConnectionFailed -> reason %d", iReason);
- delSetting(DB_KEY_TOKEN);
+
+ if (iReason != LOGINERR_NONETWORK && iReason != LOGINERR_NOSERVER)
+ delSetting(DB_KEY_TOKEN);
ProtoBroadcastAck(0, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, iReason);
ShutdownSession();
|