Skip to content

Commit

Permalink
Test blocking socket for threads service.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengshuxin committed Nov 11, 2023
1 parent 83d5e4b commit cf4747a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib_acl/src/master/template/acl_threads_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,13 +787,14 @@ static void server_accept_sock(int event_type, ACL_EVENT *event,
memset(local, 0, sizeof(local));
}

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

client_open(event, threads, fd, remote, local);
continue;
Expand Down

0 comments on commit cf4747a

Please sign in to comment.