Fix netplay on modern versions of Visual Studio, from Ala-lala
This commit is contained in:
@@ -146,12 +146,12 @@ dataReadyCallback(NetDescriptor *nd) {
|
||||
}
|
||||
|
||||
if (numRead == -1) {
|
||||
switch (errno) {
|
||||
case EAGAIN: // No more data for now.
|
||||
return;
|
||||
case EINTR: // System call was interrupted. Retry.
|
||||
continue;
|
||||
default: {
|
||||
if (errno == EWOULDBLOCK || errno == EAGAIN)
|
||||
return; // No more data for now.
|
||||
else if (errno == EINTR)
|
||||
continue; // System call was interrupted. Retry.
|
||||
else
|
||||
{
|
||||
int savedErrno = errno;
|
||||
log_add(log_Error, "recv() failed: %s.\n",
|
||||
strerror(errno));
|
||||
@@ -160,7 +160,6 @@ dataReadyCallback(NetDescriptor *nd) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
conn->readEnd += numRead;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user