Fix #1533 - fix iotest error on windows

This commit is contained in:
Sergey Lyubka committed 2022-04-22 20:53:54 +01:00
1 parent a7cbc19755
commit bdd7d92108
2 files changed
+8

No files matched your search

+4
View File
@@ -502,7 +502,11 @@ static void mg_iotest(struct mg_mgr *mgr, int ms) {
}
if ((rc = select((int) maxfd + 1, &rset, &wset, NULL, &tv)) < 0) {
#if MG_ARCH == MG_ARCH_WIN32
if (maxfd == 0) Sleep(ms); // On Windows, select fails if no sockets
#else
MG_ERROR(("select: %d %d", rc, MG_SOCK_ERRNO));
#endif
FD_ZERO(&rset);
FD_ZERO(&wset);
}