Network/TcpClient: Fix QueryState() when connection failed

Former-commit-id: 15824535922186c0601ade8bfbbe76866b7cd5ff
This commit is contained in:
Lynix 2015-11-13 14:01:36 +01:00
parent 5325513bd8
commit a324f44901
1 changed files with 41 additions and 35 deletions

View File

@ -93,6 +93,9 @@ namespace Nz
}
SocketState TcpClient::QueryState()
{
// Only check state if we have a valid handle, else we're not connected.
if (m_handle != SocketImpl::InvalidHandle)
{
// Check our state depending on our last state
switch (m_state)
@ -138,6 +141,9 @@ namespace Nz
break;
}
}
}
else
UpdateState(SocketState_NotConnected);
return m_state;
}