mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
parent
3fb373a8ef
commit
bb45637d0b
5 changed files with 110 additions and 38 deletions
|
@ -44,7 +44,10 @@ WebSocket::WebSocket(ApiClient *client)
|
|||
connect(client, &ApiClient::authenticatedChanged, this, [this](bool isAuthenticated) {
|
||||
if (isAuthenticated) {
|
||||
this->m_reconnectAttempt = 0;
|
||||
this->open();
|
||||
// https://github.com/heartfin/harbour-sailfin/issues/16
|
||||
// Opening a websocket just afther the authentication may cause the application to freeze
|
||||
// Therefore, we delay the initialisation :)
|
||||
QTimer::singleShot(5'000, this, &WebSocket::open);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue