From e602c2b271c4efdd0f9138863fb16f5b790fb824 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 27 Oct 2014 11:10:48 -0400 Subject: 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 --- src/usocket.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/usocket.c b/src/usocket.c index 096ecd0..ca483f4 100644 --- a/src/usocket.c +++ b/src/usocket.c @@ -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; } -- cgit v1.2.3-55-g6feb