diff --git a/libshviotqt/src/rpc/clientconnection.cpp b/libshviotqt/src/rpc/clientconnection.cpp index 2e5ce8a1c..636d3f031 100644 --- a/libshviotqt/src/rpc/clientconnection.cpp +++ b/libshviotqt/src/rpc/clientconnection.cpp @@ -436,6 +436,12 @@ void ClientConnection::onSocketConnectedChanged(bool is_connected) setState(State::BrokerConnected); } else { + QTimer::singleShot(cp::RpcDriver::defaultRpcTimeoutMsec(), this, [this] () { + if (state() != State::BrokerConnected) { + // login timeout + close(); + } + }); sendHello(); } }