Commit Graph

18 Commits

Author SHA1 Message Date
Guangcong Luo
dd51ac8244 Drop invalid messages in the socket process 2014-03-23 05:08:26 -04:00
Guangcong Luo
70261a5559 Fix specifying port on commandline 2014-02-26 14:19:24 -05:00
小太
7b3e5b5db5 Include a better ghost user hack/fix since I found the previous one didn't kill all ghost connections. 2014-01-15 02:15:09 +11:00
Guangcong Luo
7755803f39 Better comments for sockets.js 2014-01-02 22:14:54 -08:00
小太
534d2cee7c Add comments describing previous hack 2013-12-28 14:19:17 +11:00
小太
0b57c03d19 Hack: Manually call the timeout callback for connections where the timeout somehow got cancelled
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.
2013-12-27 22:10:32 +11:00
Guangcong Luo
b9008dc158 Fix crash in sockets.js 2013-12-20 23:05:07 -08:00
Guangcong Luo
d9a36ecbc6 Use ofe in sockets.js when available 2013-12-20 16:14:21 -08:00
Guangcong Luo
59470dd304 Fix lag from old channels not being cleaned up 2013-12-20 16:12:04 -08:00
Guangcong Luo
7707478e38 Remove a failed attempt to recover from worker crash 2013-12-18 22:08:34 -08:00
Guangcong Luo
c6d5e6045e Fix potential crash in Sockets.killWorker 2013-12-18 20:13:00 -08:00
Joimer
9e43b0ea1e Respawn suddenly dead worker on cluster 2013-12-16 11:33:47 +01:00
小太
82c67dc736 Move sweepClosedSockets() to sockets.js 2013-12-13 19:51:17 +11:00
Guangcong Luo
a745958e44 Crashguard socket worker processes 2013-11-20 12:15:27 -08:00
Guangcong Luo
80bf389570 API for spawning/killing socket worker processes 2013-11-19 01:31:03 -08:00
Guangcong Luo
dc70892f14 Use channels for broadcasting
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.
2013-11-13 19:55:26 -08:00
Guangcong Luo
b959935e3a Less logging 2013-11-13 19:52:45 -08:00
Guangcong Luo
466359023f Load balance connections to proxy processes
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.
2013-11-13 18:44:44 -08:00