Commit Graph

40 Commits

Author SHA1 Message Date
Guangcong Luo
1dde0a9473 Some debug code for diagnosing node-static issues 2015-07-21 06:39:10 -04:00
Guangcong Luo
46a5fb0d3b Add diagnostic for obscure crash 2015-06-16 19:12:21 -04:00
Ivo Julca
4222ffb5df Dependant support: make sure that relative paths are resolved properly 2015-05-11 15:38:18 -05:00
Morfent
8adb36508e Remove Heroku hack
The issues Heroku had with SockJS have been fixed for a while since
https://github.com/sockjs/sockjs-node/issues/57, now that it supports
long polling and WebSockets.
2015-04-20 00:42:14 -03:00
Christopher Monsanto
8d87af870f Use 0.0.0.0 if Config.bindaddress is missing.
This is because io.js tries ipv6 first, which the rest of PS does not
support very well.
2015-04-11 22:06:23 -04:00
Ivo Julca
83ffa44e51 Properly fix merge conflict from #1663 2015-03-25 12:17:07 -05:00
Ivo Julca
fe4eb481fa Simplify b6aea81 2015-03-24 14:37:23 -05:00
Guangcong Luo
b6aea81fdf Don't listen on SSL when port overridden
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.
2015-03-23 02:38:09 -04:00
Guangcong Luo
bcadde20e9 Stop telling people to go to 0.0.0.0
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".
2015-03-20 00:21:20 -04:00
Guangcong Luo
23c67c9140 Quit PS child processes when parent quits
Previously, child processes would stick around in certain cases.

Fixes #1507.
2015-02-05 01:16:47 -06:00
小太
6138ab9e0b Add REPL sockets 2014-12-14 23:11:13 +11:00
Guangcong Luo
018155c9c3 Fix Config.bindaddress
It wasn't getting propagated to socket processes correctly. Also change
the default bind address from 'localhost' to undefined (accept all
connections).
2014-10-29 20:51:00 -04:00
ryanj
3c943fb096 Autoconfiguration for cloud hosting environments, OpenShift support 2014-10-24 23:02:07 -07:00
小太
5027be79fb Add jscs as a style checker, and add some extra jshint options 2014-09-29 18:38:01 +10:00
Guangcong Luo
9bd804838f Implement subchannels
This pushes most of the work of dealing with `|split` from the
main (room) process to the socket process.
2014-08-25 23:48:33 -04:00
Guangcong Luo
12b673bb49 Fix style errors; update gulpfile
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.
2014-08-10 18:06:44 -04:00
小太
9d0150941b Very minor style fixes 2014-04-28 18:49:09 +10:00
小太
5c8fc7b982 Space after function for anonymous functions 2014-04-22 01:58:16 +10:00
小太
6fb3bc332a Spaces around operators and === instead of == 2014-04-22 01:56:11 +10:00
Slayer95
0126585385 Declare ´channelid´ in sockets´ close event handler 2014-04-17 01:14:15 -04:00
Slayer95
75559362b4 Rename global config to Config 2014-04-17 01:12:28 -04:00
Slayer95
b262316d57 Remove globals defined at sockets.js
App, AppSSL, Server, sweepClosedSocketsInterval and sweepClosedSockets.
2014-04-17 01:10:44 -04:00
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