mirror of
				https://github.com/lunarmodules/luasocket.git
				synced 2025-10-31 02:15:38 +01:00 
			
		
		
		
	src/usocket: Don't unset/set O_NONBLOCK around listen() or shutdown() calls.
It doesn't effect them. Not true on windows
This commit is contained in:
		| @@ -139,9 +139,7 @@ int socket_bind(p_socket ps, SA *addr, socklen_t len) { | ||||
| \*-------------------------------------------------------------------------*/ | ||||
| int socket_listen(p_socket ps, int backlog) { | ||||
|     int err = IO_DONE;  | ||||
|     socket_setblocking(ps); | ||||
|     if (listen(*ps, backlog)) err = errno;  | ||||
|     socket_setnonblocking(ps); | ||||
|     return err; | ||||
| } | ||||
|  | ||||
| @@ -149,9 +147,7 @@ int socket_listen(p_socket ps, int backlog) { | ||||
| *  | ||||
| \*-------------------------------------------------------------------------*/ | ||||
| void socket_shutdown(p_socket ps, int how) { | ||||
|     socket_setblocking(ps); | ||||
|     shutdown(*ps, how); | ||||
|     socket_setnonblocking(ps); | ||||
| } | ||||
|  | ||||
| /*-------------------------------------------------------------------------*\ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user