Henry Jen wrote:
Justin Erenkrantz wrote:
In short, there's no way to portably detect the socket is closed via a
poll()-like mechanism.  It seems like everyone keeps running into
this.  Apparently, the only way to know if it is closed is to read()
from it - which really sucks.  -- justin


If that's not possible, how do I remove the socket from the pollset in a thread-safe way on platforms using select like Win32?


I have posted the patch few months ago, that allows that for Win32.
Feel free to test if it works for your use case.

http://marc.theaimsgroup.com/?l=apr-dev&m=114856860224745&w=2

Regards,
Mladen.

Reply via email to