xavi-js/xavi-client — pull request #2 by lipsmack (2014-02-07 11:23:08+00:00)
Title: Unbinds and detaches socket regardless of origin of disconnection

If the server initiates the disconnection, we should still clean up event bindings and reset the connection property, or the client instance will be in a broken state.