primus/primus — pull request #75 by brycekahle (2013-10-30 20:25:52+00:00)
Title: Fix SockJS reconnect

Fixes #32
SockJS never sends an error event, instead it always sends a close event. In the event the server disconnects (e.g. server crash), primus would attempt to reconnect but only try once because it expects an error event on any failed reconnect attempts.

This change will correctly send the error event when the initial SockJS connection fails, which is always the reconnection scenario for SockJS.