> Can you elaborate on how that code would result in fd leaks?

By not handling exceptions, which in turn means `close` is not called on the 
socket.

Also, using `asyncCheck` causes the exception that `send` raises to pop out of 
the `poll` call instead at which point the context for the exception is lost, 
because you don't really know which async task the exception originated from - 
this leads to a number of issues which is why we've deprectated it in `chronos`.

Technically one could add finalizers to `AsyncSocket` and friends but due to 
the non-deterministic behavior of the GC, this is still not a solution - it 
would be vulnerable to exhaustion attacks and a number of other issues which 
makes the whole construct non-suitable for production use. 

Reply via email to