Simon Detheridge
9fd4699098
Merge remote-tracking branch 'origin/bg-avoid-emit-when-client-not-connected' into spd-trycatch-all-the-things
2020-02-04 12:35:35 +00:00
Simon Detheridge
216a977922
Add try/catch around all client emissions
2020-02-04 12:13:03 +00:00
Brian Gough
ebb83e4633
use diconnected property, not connected
2020-02-04 11:59:25 +00:00
Brian Gough
7380d523d5
avoid emitting when client not connected
...
the emit is happening asynchronously after the client list is computed,
so clients may have disconnected in the intervening time.
2020-02-04 11:39:37 +00:00
Brian Gough
4f94110225
Merge pull request #84 from overleaf/spd-catch-errors
...
Bump to Node 10 and add error handlers for socket.io
2020-02-03 14:59:04 +00:00
Brian Gough
49a8e1214b
use a separate field for client errors
2020-02-03 14:47:45 +00:00
Brian Gough
e04b6e1e49
Update app/coffee/Router.coffee
...
Co-Authored-By: Jakob Ackermann <das7pad@outlook.com>
2020-02-03 14:46:14 +00:00
Shane Kilkelly
6df88ebc49
Filter "comments" if restricted user.
2019-10-30 13:54:40 +00:00
Shane Kilkelly
403caa65e8
Revert "Revert "Track the isRestrictedUser
flag on clients""
...
This reverts commit 651e392a7c644403f199e1b03e7494b61ce71d0c.
2019-10-30 13:52:36 +00:00
Simon Detheridge
925a8651c1
Revert "Track the isRestrictedUser
flag on clients"
2019-10-22 10:17:38 +01:00
Simon Detheridge
7543f2fcbd
Catch errors from socket.io and attempt graceful cleanup
2019-10-17 12:45:56 +01:00
Shane Kilkelly
2cc2be3d9c
send messages to clients with concurrency of 2
2019-10-11 10:01:21 +01:00
Shane Kilkelly
06aa578bdc
Make it an error when we get no data from joinProject
2019-10-11 09:57:16 +01:00
Shane Kilkelly
df6cd4a054
Also block getConnectedUsers for restricted users.
...
Plus refactor to use a pass list instead of a deny list.
2019-10-04 13:41:49 +01:00
Shane Kilkelly
6765d03339
Track the isRestrictedUser
flag on clients
...
Then, don't send new chat messages and new comments to those restricted clients.
We do this because we don't want to leak private information (email addresses
and names) to "restricted" users, those who have read-only access via a
shared token.
2019-10-04 10:30:24 +01:00
Simon Detheridge
21e294c6eb
Generate retryable error when hitting rate limits in web
2019-09-02 11:27:04 +01:00
Brian Gough
fe2e7b3065
minimal fix for undefined connected users
2019-08-16 10:07:30 +01:00
Henry Oswald
38ed780d80
add log line to draining
2019-08-15 14:41:22 +01:00
Brian Gough
a7a161556f
Merge branch 'bg-status-on-shutdown'
2019-08-15 09:42:00 +01:00
Brian Gough
fa94e3d5e3
Merge pull request #69 from overleaf/ho-drain-connections-timewindow
...
add shutdownDrainTimeWindow, drains all connections within time range
2019-08-15 09:22:10 +01:00
Brian Gough
022e47b5c8
Merge pull request #73 from overleaf/bg-connected-client-metrics
...
add connected client count metric
2019-08-15 09:20:03 +01:00
Brian Gough
f13e66b453
fix client count so that result is zero when all clients have left
2019-08-14 15:34:23 +01:00
Brian Gough
8270c14d86
add connected client count metric
2019-08-14 15:22:03 +01:00
Brian Gough
d3171e4e2e
remove unwanted argument
2019-08-14 13:03:06 +01:00
Brian Gough
20d442120f
notify docupdate if the flush is from a shutdown
2019-08-13 17:36:53 +01:00
Brian Gough
0708f717fd
reject connections when shutdown in progress
...
send a message to the client to reconnect immediately
2019-08-13 16:59:15 +01:00
Brian Gough
b3e5709b64
enforce a minimum drain rate
2019-08-13 16:15:30 +01:00
Henry Oswald
00cca29d9e
add shutdownDrainTimeWindow, drains all connections within time range
2019-08-13 14:21:47 +01:00
Brian Gough
2000f478a7
refresh the client list on demand
2019-08-13 10:40:03 +01:00
Brian Gough
478a727c61
ignore spurious requests to leave other docs
2019-07-29 15:19:08 +01:00
Brian Gough
04a171171f
fix async behaviour of join/leave
2019-07-29 11:54:02 +01:00
Brian Gough
22d722f3e8
add metric for RoomEvents listeners
2019-07-24 16:25:45 +01:00
Brian Gough
277ec71a5b
subscribe to doc updates before requesting doc content
2019-07-24 15:49:29 +01:00
Brian Gough
1c74cbbc4e
add comments
2019-07-24 15:49:29 +01:00
Brian Gough
273af3f3aa
refactor subscribe resolution
2019-07-24 14:30:48 +01:00
Brian Gough
e14a94906a
update naming from Set -> Map
2019-07-24 14:18:15 +01:00
Brian Gough
cb53bfafd6
remove unnecessary require
2019-07-24 09:52:31 +01:00
Brian Gough
61b3a000b4
fix whitespace
2019-07-24 09:52:20 +01:00
Brian Gough
159b39c491
ensure redis channel is subscribed when joining room
2019-07-23 17:02:09 +01:00
Brian Gough
84e6ff616f
whitespace fix
2019-07-22 12:25:41 +01:00
Brian Gough
92e6910180
cleanup
2019-07-22 11:23:33 +01:00
Brian Gough
a538d10488
extend comment re disconnection
2019-07-19 08:56:38 +01:00
Brian Gough
616014e05d
add comment about automatically leaving rooms
2019-07-19 08:50:43 +01:00
Brian Gough
3bf5dd5d6b
clarify errors for subscribe/unsubscribe
2019-07-18 14:25:25 +01:00
Brian Gough
f6f6f549d9
don't publish on individual channels until explicitly set
2019-07-18 12:55:23 +01:00
Brian Gough
804f4c2bd2
listen on separate channels for each project/doc
2019-07-18 12:55:23 +01:00
Brian Gough
9ecce32ff9
Merge pull request #63 from overleaf/bg-log-out-of-order-events
...
log out of order events now that the rate is lower
2019-07-17 13:47:45 +01:00
Brian Gough
8a7804f0a7
make event order check a configuration setting
2019-07-15 13:45:34 +01:00
Brian Gough
24a4709cff
log out of order events now that the rate is lower
2019-07-15 11:14:48 +01:00
Brian Gough
e632f9f29d
only create per-client metrics when there are multiple redis clients
2019-07-11 11:35:48 +01:00