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.
This commit is contained in:
parent
99bf634990
commit
7235a132b7
@ -59,7 +59,7 @@ TunnelProxyRemoteConnection::~TunnelProxyRemoteConnection()
|
|||||||
|
|
||||||
bool TunnelProxyRemoteConnection::remoteConnected() const
|
bool TunnelProxyRemoteConnection::remoteConnected() const
|
||||||
{
|
{
|
||||||
return m_remoteConnected;
|
return m_state == StateRemoteConnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
TunnelProxyRemoteConnection::State TunnelProxyRemoteConnection::state() const
|
TunnelProxyRemoteConnection::State TunnelProxyRemoteConnection::state() const
|
||||||
@ -273,18 +273,9 @@ void TunnelProxyRemoteConnection::setState(State state)
|
|||||||
m_state = state;
|
m_state = state;
|
||||||
qCDebug(dcTunnelProxyRemoteConnection()) << "State changed" << m_state;
|
qCDebug(dcTunnelProxyRemoteConnection()) << "State changed" << m_state;
|
||||||
emit stateChanged(m_state);
|
emit stateChanged(m_state);
|
||||||
|
emit remoteConnectedChanged(m_state == StateRemoteConnected);
|
||||||
setRemoteConnected(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)
|
void TunnelProxyRemoteConnection::setError(QAbstractSocket::SocketError error)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -118,8 +118,6 @@ private:
|
|||||||
|
|
||||||
QUuid m_serverUuid;
|
QUuid m_serverUuid;
|
||||||
|
|
||||||
bool m_remoteConnected = false;
|
|
||||||
|
|
||||||
// Remote proxy server information
|
// Remote proxy server information
|
||||||
QString m_remoteProxyServer;
|
QString m_remoteProxyServer;
|
||||||
QString m_remoteProxyServerName;
|
QString m_remoteProxyServerName;
|
||||||
|
|||||||
Reference in New Issue
Block a user