othiym23/async-listener — pull request #15 by apparentlymart (2014-04-25 03:32:00+00:00)
Title: Don't try to wrap socket "onread" when socket is already closed.

In order to wrap socket._handle.onread, we hook into the server's 'connection' event with the aim of wrapping the onread function before request handling begins.

However, it is possible that other 'connection' event handlers will run before ours, and they may close the connection before we get a chance to run. In that case, socket._handle is already gone and there is no
longer any onread function for us to wrap, so we just do nothing.

I believe this resolves issue #3.