Expect a PONG response to our PINGs (#1476)

If no PONG was received, force a reconnection

Fixes #1164
This commit is contained in:
pajlada
2020-01-03 20:55:13 +01:00
committed by GitHub
parent 3c8992cac1
commit 90296a2d85
2 changed files with 31 additions and 1 deletions
+3
View File
@@ -18,6 +18,9 @@ private:
QTimer pingTimer_;
QTimer reconnectTimer_;
std::atomic<bool> recentlyReceivedMessage_{true};
// waitingForPong_ is set to true when we send a PING message, and back to false when we receive the matching PONG response
std::atomic<bool> waitingForPong_{false};
};
} // namespace chatterino