Commit graph

51 commits

Author SHA1 Message Date
Jakob Ackermann
45ac2bdd97 Merge pull request #153 from overleaf/jpa-backport-drainmanager-tests
[backport] 108 and 112: DrainManager acceptance tests
2020-06-10 11:28:08 +02:00
Jakob Ackermann
de35fc5ecf [HttpApiController] implement the disconnection of a single client
The http route returns as soon as the client has fully disconnected.
2020-06-09 18:01:08 +01:00
Jakob Ackermann
acb7d7df5a [misc] add test cases for the validation of the callback argument
When the user provides a function as last argument for socket.emit,
 socket.io will flag this as an RPC and add a cb as the last argument
 to the client.on('event', ...) handler on the server side.
Without a function as last argument for socket.emit, the callback
 argument on the server side is undefined, leading to invalid function
 calls (`undefined()`) and an unhandled exception.
The user can also provide lots of other arguments, so the 2nd/3rd ...
 argument is of arbitrary type, again leading to invalid function calls
 -- e.g. `1()`.
2020-06-09 16:30:03 +01:00
Jakob Ackermann
1c9eaf574a Merge pull request #147 from overleaf/jpa-backport-141
[backport] 141: Router: validate the callback argument
2020-06-09 14:41:24 +02:00
Jakob Ackermann
32af7001fc [misc] Router: prefix the publicId with 'P.' for easy differentiation 2020-06-08 11:29:40 +01:00
Jakob Ackermann
0840700ffd [Router] validate the callback argument 2020-06-05 10:59:01 +01:00
Jakob Ackermann
c6d08647c7 [misc] socket.io: use a secondary publicId for public facing usages 2020-06-04 17:18:07 +01:00
Brian Gough
64bd739a87 Revert "Merge pull request #91 from overleaf/spd-trycatch-all-the-things"
This reverts commit 2bf7f14f9d050c58f141f465633bb6e274b903dd, reversing
changes made to 989240812532ca43a52513339f4dda8f44a80a64.
2020-02-05 10:05:36 +00:00
Simon Detheridge
216a977922 Add try/catch around all client emissions 2020-02-04 12:13:03 +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
Simon Detheridge
7543f2fcbd Catch errors from socket.io and attempt graceful cleanup 2019-10-17 12:45:56 +01:00
Simon Detheridge
21e294c6eb Generate retryable error when hitting rate limits in web 2019-09-02 11:27:04 +01:00
Brian Gough
a7a161556f Merge branch 'bg-status-on-shutdown' 2019-08-15 09:42:00 +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
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
b734f7a3f7 convert errors to warnings 2017-11-10 15:01:23 +00:00
Shane Kilkelly
3b39464aa5 Merge branch 'master' into sk-unlisted-projects 2017-11-02 10:58:41 +00:00
Shane Kilkelly
76673d5f0a Change anonToken to anonymousAccessToken 2017-10-20 10:10:58 +01:00
Shane Kilkelly
438bb28c04 Get anonToken from joinProject payload 2017-09-29 16:32:46 +01:00
Shane Kilkelly
d4c735c3ea Pass anonymous-read token along as header to web-api 2017-09-26 14:21:41 +01:00
Alasdair Smith
937bf82a2f Return callback with guard 2017-09-22 09:25:24 +01:00
Alasdair Smith
5d8e201732 Don't return obj 2017-09-21 16:58:03 +01:00
Alasdair Smith
90d05dc6dd Make args order consistent 2017-09-21 16:56:09 +01:00
Alasdair Smith
3966e2f85b Make variadic options more explicit 2017-09-21 16:55:49 +01:00
Alasdair Smith
790b9ea8ed Switch order of args 2017-09-21 15:19:19 +01:00
Alasdair Smith
b796879c9f Handle options not being passed 2017-09-21 14:58:49 +01:00
Alasdair Smith
aa6e0d0d69 Only encode ranges if option passed 2017-09-21 14:23:16 +01:00
Brian Gough
2e0f5b74db send connectionAccepted/Rejected events on connect
let the client know whether it has successfully authenticated
2016-10-28 15:41:57 +01:00
James Allen
59d042e264 Add end point to start draining clients 2016-10-24 16:36:09 +01:00
Shane Kilkelly
185bc7e635 Update session code 2016-09-07 08:58:35 +01:00
James Allen
51939512ac Return semantic error if doc ops range is not loaded 2016-05-31 14:21:23 +01:00
James Allen
f4a465ea69 Return a 'not authorized' error if the user is not logged in/authorized 2016-05-31 11:49:51 +01:00
James Allen
343ec9d708 Add in flags that track how often each callback is called 2016-05-26 15:46:45 +01:00
James Allen
536118b0cf Relay messages received via HTTP into the project 2015-03-03 17:15:19 +00:00
James Allen
a48c8aad92 Support anonymous access 2014-11-21 11:48:59 +00:00
James Allen
2a05045600 Add in redis health check 2014-11-20 16:56:09 +00:00
James Allen
2cb365d2b4 Add /status end point 2014-11-17 14:38:43 +00:00
James Allen
66dfafdebe Add metrics into all end points 2014-11-17 13:12:49 +00:00
James Allen
7b275e9e0e Add acceptence tests for leaving(disconnecting) from a project 2014-11-17 12:23:30 +00:00
James Allen
fef5f6b775 Add acceptance tests for applyOtUpdate 2014-11-14 10:12:35 +00:00
James Allen
e769819521 Add in clientTracking.updatePosition end point 2014-11-13 15:27:18 +00:00
James Allen
84778b5961 Mark user as connected for cursor updates when joining project 2014-11-13 13:05:49 +00:00
James Allen
6ed2a0d04d Refactor client attribute fetching and logging 2014-11-13 12:03:43 +00:00
James Allen
0b18edeff3 Add in /clients and /client/:client_id status end points 2014-11-13 11:48:49 +00:00
James Allen
8b923d2fda Add in leaveDoc end point 2014-11-12 16:51:48 +00:00
James Allen
eb8ccc0298 Create joinDoc socket.io end point 2014-11-12 15:54:55 +00:00
James Allen
919b192e16 Add in null check 2014-11-10 11:40:19 +00:00
James Allen
02c0a3a867 Create joinProject socket.io endpoint 2014-11-10 11:27:08 +00:00