mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ensure accept is nonblocking
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
52f28ce67a
commit
6f047eea6c
1 changed files with 3 additions and 0 deletions
|
@ -222,6 +222,9 @@ int lws_server_socket_service(struct libwebsocket_context *context,
|
|||
setsockopt(accept_fd, IPPROTO_TCP, TCP_NODELAY,
|
||||
(const void *)&opt, sizeof(opt));
|
||||
|
||||
/* We are nonblocking... */
|
||||
fcntl(accept_fd, F_SETFL, O_NONBLOCK);
|
||||
|
||||
/*
|
||||
* look at who we connected to and give user code a chance
|
||||
* to reject based on client IP. There's no protocol selected
|
||||
|
|
Loading…
Add table
Reference in a new issue