]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
websocket: fix timer interval
authortobtoht <tob@featherwallet.org>
Sat, 14 Jan 2023 13:55:44 +0000 (14:55 +0100)
committertobtoht <tob@featherwallet.org>
Sat, 14 Jan 2023 13:55:44 +0000 (14:55 +0100)
src/utils/WebsocketClient.cpp
src/utils/WebsocketClient.h

index af1a559e2025b0a3610c069c664684a4c3d2dd19..aadf34a7445bb2d3a29d1a8c1c7b607e9a2f12f1 100644 (file)
@@ -97,6 +97,7 @@ void WebsocketClient::nextWebsocketUrl() {
 void WebsocketClient::onConnectionTimeout() {
     qWarning() << "Websocket connection timeout";
     m_timeout = std::min(m_timeout + 5, 60);
+    m_connectionTimeout.setInterval(m_timeout*1000);
     this->onDisconnected();
 }
 
index 3e5d5f86d4943eae602c7321a9f3399e149c316d..1b88151c0c84f6be4f31c738502e50130f0f81f8 100644 (file)
@@ -40,7 +40,7 @@ private:
     QUrl m_url;
     QTimer m_pingTimer;
     QTimer m_connectionTimeout;
-    int m_timeout = 10;
+    int m_timeout = 20;
     int m_websocketUrlIndex = 0;
     bool m_stopped = false;
 };