mrjoes/sockjs-tornado — pull request #38 by justinrosenthal (2013-01-29 21:00:07+00:00)
Title: RawWebSocketTransport can create an invalid (open, handler-less) session

If there is an exception during session.on_message, RawWebSocketTransport is catching it and aborting the connection. However, it is also detaching the session before aborting, so when on_close get's called, session is already None. In this instance, the session never gets closed so the application doesn't have a chance to do any cleanup.