diff --git a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.cpp b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.cpp index a07e24c..0a21ff3 100644 --- a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.cpp +++ b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.cpp @@ -270,10 +270,16 @@ void TunnelProxyRemoteConnection::setState(State state) if (m_state == state) return; + bool remoteConnected = m_state == StateRemoteConnected; + m_state = state; qCDebug(dcTunnelProxyRemoteConnection()) << "State changed" << m_state; emit stateChanged(m_state); - emit remoteConnectedChanged(m_state == StateRemoteConnected); + + bool stillRemoteConnected = m_state == StateRemoteConnected; + if (remoteConnected != stillRemoteConnected) { + emit remoteConnectedChanged(m_state == StateRemoteConnected); + } }