From d33c0317d3854d48394c14a60eaf34ac1e5d7a03 Mon Sep 17 00:00:00 2001 From: James Callahan Date: Mon, 27 Oct 2014 11:10:48 -0400 Subject: [PATCH] src/usocket: Do not setblocking on destory; 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(-) diff --git a/src/usocket.c b/src/usocket.c index 096ecd00..ca483f4b 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; }