From c0895c25140c630b03e4c9ece9d290bc0e0b1227 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 10 Feb 2024 19:27:14 +0300 Subject: =?UTF-8?q?fixes=20#4178=20(Discord:=20=D1=82=D0=BE=D0=BA=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BE=D1=87=D0=B8=D1=89=D0=B0=D0=B5=D1=82=D1=81=D1=8F?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=BF=D1=80=D0=BE=D0=BF=D0=B0=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B8=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D0=BD?= =?UTF-8?q?=D0=B5=D1=82=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Discord/src/connection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols/Discord/src') 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(); -- cgit v1.2.3