Network/TcpClient: Fix QueryState() when connection failed
Former-commit-id: 15824535922186c0601ade8bfbbe76866b7cd5ff
This commit is contained in:
parent
5325513bd8
commit
a324f44901
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue