Network/Socket: Fix Connect (timeout) on Windows/Linux
This commit is contained in:
parent
d0e33225b7
commit
56873b92b0
|
|
@ -141,6 +141,7 @@ Nazara Engine:
|
|||
- Added SegmentCollider2D::GetThickness
|
||||
- Fixed vertices generation/render queue submit when using multiples materials on a Tilemap
|
||||
- It is now possible to prevent CompoundCollider2D to override individual colliders properties
|
||||
- Fixed TcpClient::WaitForConnected possible failure (although connected) on Windows/Linux
|
||||
|
||||
Nazara Development Kit:
|
||||
- Added ImageWidget (#139)
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ namespace Nz
|
|||
tv.tv_usec = static_cast<long>((msTimeout % 1000ULL) * 1000ULL);
|
||||
|
||||
int ret = select(handle + 1, nullptr, &localSet, &localSet, (msTimeout > 0) ? &tv : nullptr);
|
||||
if (ret == SOCKET_ERROR)
|
||||
if (ret > 0)
|
||||
{
|
||||
int code = GetLastErrorCode(handle, error);
|
||||
if (code < 0) //< GetLastErrorCode() failed
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ namespace Nz
|
|||
switch (errorCode) //< Check for "normal errors" first
|
||||
{
|
||||
case WSAEALREADY:
|
||||
case WSAEINVAL: //< In case of connect, WSAEINVAL may be returned instead of WSAEALREADY
|
||||
case WSAEWOULDBLOCK:
|
||||
return SocketState_Connecting;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue