diff options
author | George Hazan <george.hazan@gmail.com> | 2024-02-10 19:27:14 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-02-10 19:27:14 +0300 |
commit | c0895c25140c630b03e4c9ece9d290bc0e0b1227 (patch) | |
tree | 8da16077aaf4e115a9d7c64bceccd608eb43e390 /protocols/Discord/src/connection.cpp | |
parent | 8d9fb2ecdca01805f3a1db7e89a6873286efb898 (diff) |
fixes #4178 (Discord: токен очищается при пропадании интернета)
Diffstat (limited to 'protocols/Discord/src/connection.cpp')
-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();
|