Zarel/Pokemon-Showdown — pull request #522 by kotarou3 (2013-12-27 11:19:22+00:00)
Title: Hack: Manually call the timeout callback for connections where the timeout somehow got cancelled

After looking in to why ghost users occurred and the differences between normal users, I found that the connection's `_session.to_tref._idleTimeout` property was -1 for all ghost users while a normal timeout value for normal users.
Simply calling `_session.timeout_cb` on those connections killed those connections.
This timeout is the timeout that sockjs sets to wait for users to reconnect within that time to continue their session.

I've tested this and it only kills the ghost connections without any collateral damage.