dudleycarr/nsqjs — pull request #30 by zeevl (2014-09-09 23:06:52+00:00)
Title: set up error handlers before connecting

nsqdconnection wasn't setting up the event handlers before opening it's connection. So, if the client was created without the nsq instance running, it would throw an unhandled ECONNREFUSED exception and die.

It's amazing what a difference a few spaces make. :)