rvagg/node-libssh — pull request #44 by cfra (2014-10-06 16:00:43+00:00)
Title: Disable poller and free Session when client disconnects

A client closing its socket immediately after sending some data may leave
the server with a closed socket that still has its uv poller in place,
because Session::Close() may never get called in that case. This is an error
condition that causes uv to try and poll on a closed socket and also triggers
an assertion like following as soon as the fd is reused, e.g. by a new client:

node: ../deps/uv/src/unix/core.c:724:
uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed.