diff --git a/ChangeLog.md b/ChangeLog.md index 01a31cf2a..7582edc12 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -147,7 +147,6 @@ Nazara Engine: - ⚠️ 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. - ⚠️ 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. - ⚠️ TcpClient::WaitForconnected now returns the new socket state. - Added TcpClient::PollForConnected diff --git a/src/Nazara/Network/TcpClient.cpp b/src/Nazara/Network/TcpClient.cpp index 9b43fbea0..de8e2771d 100644 --- a/src/Nazara/Network/TcpClient.cpp +++ b/src/Nazara/Network/TcpClient.cpp @@ -502,7 +502,10 @@ namespace Nz // Prevent valid stats in non-connected state if (newState == SocketState_NotConnected) - Close(); + { + m_openMode = OpenMode_NotOpen; + m_peerAddress = IpAddress::Invalid; + } UpdateState(newState); return newState;