mirror of
https://github.com/feather-wallet/feather.git
synced 2025-03-24 23:58:45 +00:00
websocket: fix timer interval
This commit is contained in:
parent
1623cfcb4f
commit
a6861e458e
2 changed files with 2 additions and 1 deletions
|
@ -97,6 +97,7 @@ void WebsocketClient::nextWebsocketUrl() {
|
||||||
void WebsocketClient::onConnectionTimeout() {
|
void WebsocketClient::onConnectionTimeout() {
|
||||||
qWarning() << "Websocket connection timeout";
|
qWarning() << "Websocket connection timeout";
|
||||||
m_timeout = std::min(m_timeout + 5, 60);
|
m_timeout = std::min(m_timeout + 5, 60);
|
||||||
|
m_connectionTimeout.setInterval(m_timeout*1000);
|
||||||
this->onDisconnected();
|
this->onDisconnected();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ private:
|
||||||
QUrl m_url;
|
QUrl m_url;
|
||||||
QTimer m_pingTimer;
|
QTimer m_pingTimer;
|
||||||
QTimer m_connectionTimeout;
|
QTimer m_connectionTimeout;
|
||||||
int m_timeout = 10;
|
int m_timeout = 20;
|
||||||
int m_websocketUrlIndex = 0;
|
int m_websocketUrlIndex = 0;
|
||||||
bool m_stopped = false;
|
bool m_stopped = false;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue