Drop redundant api which also wasn't working
The issue was that stateChanged() was emitted, and only after that m_remoteConnected being set to true. This resulted in nymea-app to try and send the Hello call right on the connected and the proxy lib would bail out saying that the remote is not connected yet. I started to fix it, but realized that state already has StateRemoteConnected, so this is really just a duplicate without any additional value.tunnel-proxy-fixes
parent
99bf634990
commit
7235a132b7
|
|
@ -59,7 +59,7 @@ TunnelProxyRemoteConnection::~TunnelProxyRemoteConnection()
|
|||
|
||||
bool TunnelProxyRemoteConnection::remoteConnected() const
|
||||
{
|
||||
return m_remoteConnected;
|
||||
return m_state == StateRemoteConnected;
|
||||
}
|
||||
|
||||
TunnelProxyRemoteConnection::State TunnelProxyRemoteConnection::state() const
|
||||
|
|
@ -273,18 +273,9 @@ void TunnelProxyRemoteConnection::setState(State state)
|
|||
m_state = state;
|
||||
qCDebug(dcTunnelProxyRemoteConnection()) << "State changed" << m_state;
|
||||
emit stateChanged(m_state);
|
||||
|
||||
setRemoteConnected(m_state == StateRemoteConnected);
|
||||
emit remoteConnectedChanged(m_state == StateRemoteConnected);
|
||||
}
|
||||
|
||||
void TunnelProxyRemoteConnection::setRemoteConnected(bool remoteConnected)
|
||||
{
|
||||
if (m_remoteConnected == remoteConnected)
|
||||
return;
|
||||
|
||||
m_remoteConnected = remoteConnected;
|
||||
emit remoteConnectedChanged(m_remoteConnected);
|
||||
}
|
||||
|
||||
void TunnelProxyRemoteConnection::setError(QAbstractSocket::SocketError error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -118,8 +118,6 @@ private:
|
|||
|
||||
QUuid m_serverUuid;
|
||||
|
||||
bool m_remoteConnected = false;
|
||||
|
||||
// Remote proxy server information
|
||||
QString m_remoteProxyServer;
|
||||
QString m_remoteProxyServerName;
|
||||
|
|
|
|||
Loading…
Reference in New Issue