restrict auto-reconnect to abnormal close code

This commit is contained in:
ouwou
2021-07-10 03:43:26 -04:00
parent b2b55eb06e
commit 41bd2334fa

View File

@@ -1891,7 +1891,7 @@ void DiscordClient::HandleSocketClose(uint16_t code) {
m_store.ClearAll();
m_guild_to_users.clear();
if (m_client_started && !m_reconnecting && close_code != GatewayCloseCode::Normal) {
if (m_client_started && !m_reconnecting && close_code == GatewayCloseCode::Abnormal) {
Glib::signal_timeout().connect_once([this] { if (m_client_started) HandleGatewayReconnect(GatewayMessage()); }, 1000);
m_reconnecting = true;
}