: nply/fiche2

commit 49ea4c7ccd736ed5cc42b7cb0075a5feebf2ca25
parent 318987c10021078baad8aa2cf4463bf8ee1cf74e
Author: Renaud Allard <renaud@allard.it>
Date: Thu, 27 Aug 2015 11:51:25 +0200

Use MSG_DONTWAIT to use non blocking operation. This solves issue #14
1 file changed, 1 insertion(+), 1 deletion(-)
M
fiche.c
|
2
+-
diff --git a/fiche.c b/fiche.c
@@ -57,7 +57,7 @@ void *thread_connection(void *args)
 
     char buffer[BUFSIZE];
     bzero(buffer, BUFSIZE);
-    int status = recv(connection_socket, buffer, BUFSIZE, MSG_WAITALL);
+    int status = recv(connection_socket, buffer, BUFSIZE, MSG_DONTWAIT);
 
     if (WHITELIST != NULL)
         if (check_whitelist(data.ip_address) == NULL)