windows get file descriptor bug fix

This commit is contained in:
Israel Lot
2019-10-03 20:21:06 +03:00
parent b7cc5f59e1
commit 28480c684c
+1 -1
View File
@@ -1836,7 +1836,7 @@ int restartServer(int flags, mstime_t delay) {
for (j = 3; j < (int)server.maxclients + 1024; j++) {
/* Test the descriptor validity before closing it, otherwise
* Valgrind issues a warning on close(). */
if (fcntl(j, IF_WIN32(1, F_GETFD), 0) != -1) close(j);
if (fcntl(j, IF_WIN32(F_GETFL, 1), 0) != -1) close(j);
}
/* Execute the server with the original command line. */