Skip to content

Commit cf4747a

Browse files
author
zhengshuxin
committed
Test blocking socket for threads service.
1 parent 83d5e4b commit cf4747a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib_acl/src/master/template/acl_threads_server.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,13 +787,14 @@ static void server_accept_sock(int event_type, ACL_EVENT *event,
787787
memset(local, 0, sizeof(local));
788788
}
789789

790-
#if defined(_WIN32) || defined(_WIN64)
791790
// On windows, the client socket will use the non-block attribute
792791
// of the listen socket, because we've set the listen socket in
793792
// non-blocking status, so we should set the client socket again
794793
// in blocking status.
794+
// And on unix the client socket will not use it from
795+
// the listen socket, and we set it to be in blocking
796+
// status is harmless.
795797
acl_non_blocking(fd, ACL_BLOCKING);
796-
#endif
797798

798799
client_open(event, threads, fd, remote, local);
799800
continue;

0 commit comments

Comments
 (0)