Skip to content

Commit

Permalink
Little more Sleep()/usleep() correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Subsentient committed Dec 29, 2014
1 parent c1d99d9 commit 16e5046
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,16 @@ void Server_Loop(void)
goto LoopStart;
}
#ifdef WIN
else if (NRR.Errno != 0 && NRR.Errno == WSAEWOULDBLOCK)
else if (NRR.Errno == WSAEWOULDBLOCK)
#else
else if (NRR.Status == -1 && NRR.Errno == EWOULDBLOCK)
#endif
{ //No data.
usleep(1500);
#ifdef WIN
Sleep(1);
#else
usleep(1000);
#endif
continue;
}

Expand Down

0 comments on commit 16e5046

Please sign in to comment.