xavi-js/xavi — pull request #37 by lipsmack (2014-04-10 16:32:03+00:00)
Title: Only close client if not closed AND not decaying

A client can sometimes report itself as DECAYING when actually CLOSED. The cause is that we do not unset `_decayTimeout` but it manifests itself by attempting to close the internal WebSocket instance more than once. Latter attempts will attempt to call `close` on `null`.