fix for windows
authorLaurent Mazet <laurent.mazet@thalesgroup.com>
Tue, 16 May 2023 16:30:00 +0000 (18:30 +0200)
committerLaurent Mazet <laurent.mazet@thalesgroup.com>
Tue, 16 May 2023 16:30:00 +0000 (18:30 +0200)
server.c

index 56b07cc07051476846f81fdf622e440d50023af3..574e54a53830b2dc24029dac66f1d015a9ac2518 100644 (file)
--- a/server.c
+++ b/server.c
@@ -133,7 +133,7 @@ socket_t open_listening_socket (int port)
 socket_t accept_incoming_connection (socket_t sock)
 {
     socket_t connection = accept (sock, NULL, 0);
-    if (connection < 0) {
+    if (connection == INVALID_SOCKET) {
         return INVALID_SOCKET;
     }