Use MSG_DONTWAIT to use non blocking operation. This solves issue #14

This commit is contained in:
Renaud Allard
2015-08-27 11:51:25 +02:00
parent 318987c100
commit 49ea4c7ccd

View File

@@ -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)