Skip to content

Commit

Permalink
src/usocket: Do not setblocking on destory;
Browse files Browse the repository at this point in the history
This results in unexpected behaviour if the socket has been `dup()`d, as O_NONBLOCK is shared.
Close is always 'blocking' anyway

See wahern/cqueues#13 for an example use case
  • Loading branch information
james-callahan committed Oct 27, 2014
1 parent d80bb0d commit d33c031
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/usocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d33c031

Please sign in to comment.