If the port is overridden (either through commandline, test framework,
or environment variable), we probably don't want to listen on any
other port, like the SSL port.
Setting Config.bindaddress = '0.0.0.0' (meaning "listen on all IP
addresses") would result in the message "Go to 0.0.0.0:8000 to
test your server" on startup, but 0.0.0.0 is not a valid IP address.
This now says "Go to localhost:8000".
It wasn't getting propagated to socket processes correctly. Also change
the default bind address from 'localhost' to undefined (accept all
connections).
I used a hack to make the multiple declaration errors go away,
so all that remained in jsHint were actual errors, which I've
now mostly fixed.
All this linting ended up uncovering one actual bug: Uproar's
message not showing. It's a very minor bug in a move no one uses,
so I'm going to fold it into this commit.
After looking in to why ghost users occured 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.
Now that we're using proxy processes, this heavily optimizes the
communication between the main process and the proxy processes
by sending broadcasted messages once, instead of once per user.
Instead of handling all connections in the master process, we now
use Node's cluster module to push them to worker processes. These
worker processes are pretty lightweight and do nothing but proxy
connections so far.