visionmedia/axon — pull request #57 by gjohnson (2012-10-17 13:45:37+00:00)
Title: debugging socket removals

See #54.

The -1 was because of ECONNREFUSED running `handleErorors()` -> `removeSocket()`, which since a connection was never made, it did not exist in the socks array. I am just ignoring and logging, seems cleaner than checking for error codes within `handleErrors()`.

I had to re-arrange the test because it kept sporadically working and not working... Added once() to "ignore error" events so only the EPIPE went and not ECONNREFUSED. Had to do pending=6 for done() because sometimes `pull == 3` failed, switching it around caused `a|b|c == 1` to fail. Of course, it would always pass if i used DEBUG? lol

Seems consistent now though...