13 Commits

Author SHA1 Message Date
Calvin Montgomery
f42e3bf2b7 Fix #656 2017-04-03 20:31:21 -07:00
Calvin Montgomery
99760b6989 Purge the awful refreshAccount logic
User.prototype.refreshAccount was responsible for multiple race
condition bugs as well as inefficient duplication of DB queries in an
attempt to correct such race conditions.

It has now been replaced by a more reasonable model:

  * Global user account information and aliases are fetched in parallel
    on socket connection
  * Channel rank is fetched when the user tries to join a channel
2016-10-03 23:12:22 -07:00
Calvin Montgomery
8b94c54d25 Fix bug causing channels to get stuck when DB is down 2016-08-31 21:32:42 -07:00
calzoneman
33f775051d Fixes for bot logins 2016-08-10 22:20:53 -07:00
calzoneman
0327b3de2e Modifications for ip session cookie 2016-08-10 22:10:02 -07:00
calzoneman
701d470494 Add initial blocking of new users in chat 2016-08-10 21:59:18 -07:00
calzoneman
312892e56b Short term additional fix for #583
The previous commits do not handle all of the edge cases of #583
appropriately.  This is a short term solution that will work, but is not
as efficient as it could be.  The whole refreshAccount function needs to
be reconsidered and replaced with a more sane way of handling atomic
updates to the user's account state.
2016-06-29 22:00:25 -07:00
calzoneman
c70dc83504 Fix previous fix 2016-06-26 21:15:33 -07:00
calzoneman
a360cd8808 Reject joins for channels mapped to other partitions 2016-06-07 22:47:49 -07:00
calzoneman
0ee7f05213 Make polls more efficient
Instead of emitting frames to each individual socket, group them into
socket.io rooms of people who can see hidden poll results and people who
can't, then just do 2 broadcasts.
2016-04-02 11:57:26 -07:00
calzoneman
20538e328f Replace legacy emitter with EventEmitter prototype 2016-04-02 11:23:34 -07:00
calzoneman
b3c85e8534 Limit requestPlaylist to once per 60 seconds
If clients call it quickly in succession with large playlists, it can
cause node to get stuck stringifying socket.io frames and cause an out
of memory crash.
2016-02-06 19:40:50 -08:00
calzoneman
0109a87e55 package: build with babel for ES2015 support
* Rename lib/ -> src/
* Add `postinstall` npm target for compiling src files to lib
* Add `build-watch` npm target for development with babel --watch
* Add `lib/` to .gitignore
* Add `source-map-support` module for babel-generated sourcemaps
2015-09-23 19:27:04 -07:00