mirror of
				https://github.com/lunarmodules/luasocket.git
				synced 2025-10-30 18:05:44 +01:00 
			
		
		
		
	src/usocket: Do not setblocking on destroy;
This results in unexpected behaviour if the socket has been `dup()`d, as O_NONBLOCK is shared. Close is always 'blocking' anyway See https://github.com/wahern/cqueues/issues/13 for an example use case
This commit is contained in:
		| @@ -92,7 +92,6 @@ int socket_close(void) { | ||||
| \*-------------------------------------------------------------------------*/ | ||||
| void socket_destroy(p_socket ps) { | ||||
|     if (*ps != SOCKET_INVALID) { | ||||
|         socket_setblocking(ps); | ||||
|         close(*ps); | ||||
|         *ps = SOCKET_INVALID; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user