oortcloud/node-ddp-client — pull request #30 by jagill (2013-12-19 02:30:06+00:00)
Title: Only have at most one reconnect timer active.

We were trying to reconnect on both error and close, which
when both were thrown, would start two reconnect attempts.
This was bad because each of the reconnect event would emit
both an error and a close event, which quickly went to an
exponentially infinite loop crashing my machine very very hard.

Now we have at most one reconnect timeout (which is cleared on
successful connection, for good measure), and we don't try
to reconnect on error. faye-websocket provides the error
event purely for informational purposes; reconnection should
be attempted on close.