Network/TcpClient: WaitForConnected now closes the socket on failure
This commit is contained in:
parent
f6b0405f9b
commit
13a515c1b5
|
|
@ -147,6 +147,7 @@ Nazara Engine:
|
||||||
- ⚠️ CullingList now handles full and partial visibility testing
|
- ⚠️ CullingList now handles full and partial visibility testing
|
||||||
- Added math class Angle, capable of handling both degrees and radians angles and converting them to euler angles/quaternions to improve 2D interface.
|
- Added math class Angle, capable of handling both degrees and radians angles and converting them to euler angles/quaternions to improve 2D interface.
|
||||||
- ⚠️ AbstractSocket::OnStateChange has been replaced by OnStateChanged, which is now called after state has been changed (with oldState and newState as parameters).
|
- ⚠️ AbstractSocket::OnStateChange has been replaced by OnStateChanged, which is now called after state has been changed (with oldState and newState as parameters).
|
||||||
|
- ⚠️ TcpClient::WaitForconnected now closes the socket on failure.
|
||||||
|
|
||||||
Nazara Development Kit:
|
Nazara Development Kit:
|
||||||
- Added ImageWidget (#139)
|
- Added ImageWidget (#139)
|
||||||
|
|
|
||||||
|
|
@ -467,9 +467,9 @@ namespace Nz
|
||||||
SocketState newState = SocketImpl::Connect(m_handle, m_peerAddress, msTimeout, &m_lastError);
|
SocketState newState = SocketImpl::Connect(m_handle, m_peerAddress, msTimeout, &m_lastError);
|
||||||
NazaraAssert(newState != SocketState_Connecting, "Invalid internal return"); //< Connect cannot return Connecting is a timeout was specified
|
NazaraAssert(newState != SocketState_Connecting, "Invalid internal return"); //< Connect cannot return Connecting is a timeout was specified
|
||||||
|
|
||||||
// Prevent valid peer address in non-connected state
|
// Prevent valid stats in non-connected state
|
||||||
if (newState == SocketState_NotConnected)
|
if (newState == SocketState_NotConnected)
|
||||||
m_peerAddress = IpAddress::Invalid;
|
Close();
|
||||||
|
|
||||||
UpdateState(newState);
|
UpdateState(newState);
|
||||||
return newState == SocketState_Connected;
|
return newState == SocketState_Connected;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue