mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-13 20:18:50 +03:00
only save state when actually disconnecting (fixes #65)
This commit is contained in:
@@ -41,7 +41,7 @@ void DiscordClient::Start() {
|
||||
m_websocket.StartConnection(GetGatewayURL());
|
||||
}
|
||||
|
||||
void DiscordClient::Stop() {
|
||||
bool DiscordClient::Stop() {
|
||||
if (m_client_started) {
|
||||
inflateEnd(&m_zstream);
|
||||
m_compressed_buf.clear();
|
||||
@@ -55,9 +55,15 @@ void DiscordClient::Stop() {
|
||||
m_guild_to_users.clear();
|
||||
|
||||
m_websocket.Stop();
|
||||
|
||||
m_client_started = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
m_client_started = false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DiscordClient::IsStarted() const {
|
||||
|
||||
Reference in New Issue
Block a user