diegonehab/luasocket — pull request #108 by daurnimator (2014-10-27 17:37:39+00:00)
Title: 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 (on unix systems)

See https://github.com/wahern/cqueues/issues/13 for an example use case

I have not done the same for windows (src/wsocket.c) as `closesocket()` can have non-blocking behaviour.
see http://msdn.microsoft.com/en-us/library/windows/desktop/ms737582(v=vs.85).aspx