Commit graph

16 commits

Author SHA1 Message Date
James Allen
345d38c28d Don't clean up a documents event listener until after the socket has disconnected on error 2016-05-27 14:39:33 +01:00
James Allen
36c8c197e1 Add more debug log lines 2016-05-27 14:14:08 +01:00
James Allen
fec3266726 Don't remove new instance of Document from openDocs when cleaning up old instance 2016-05-27 14:13:53 +01:00
James Allen
a605dae7ba Don't show saving just because of pending ops
When typing continuously, there is always a pending op present.
The only time we're not saving is if the inflight op isn't changing.
So long as this has changed, it means the previous one has been processed.
2016-05-27 14:08:46 +01:00
James Allen
0175a86d4c Add in debugging console.logs which only display if ?debug=true is in URL 2016-05-27 10:46:14 +01:00
Shane Kilkelly
77333c923b Merge branch 'master' into sk-references-ac 2016-01-04 09:37:10 +00:00
Brian Gough
1b70e08f82 reinstate the chaosmonkey 2015-12-18 09:55:24 +00:00
Shane Kilkelly
1ea13a74dd Refresh the references when the bib file is closed. 2015-12-17 15:13:02 +00:00
James Allen
99bca31766 Error and hard refresh document after 30 seconds unsaved changes 2015-11-19 12:04:12 +00:00
James Allen
bf452bf306 Keep the connection.id up to date with socket.io client id
The meta.source of an update is populated on the server side so
we need to keep our local connection id up to date with it. When a duplicate
op is submitted we must send all possible client ids that it could have
been sent with.
2015-11-19 12:04:12 +00:00
James Allen
cde5144c42 Retry updates that have not been acknowledged.
If we do not get a reply from the server acknowledging our update after 5 seconds,
send it again. If it never got to the server, this is like normal. If the update
got to the server, but we never received the ack then we need to rely on ShareJs's
duplicate handling. We set the dupIfSource parameter on any retried updates which
let ShareJs know that it's a dup if we already have an op with this version number
and client id. The doc-updater and real-time services need changes to correctly
send another ack only to the submitting client in the case of a duplicate update.
2015-11-19 12:04:12 +00:00
James Allen
a153c6682a Put in client side check for document getting too long 2015-11-06 12:51:43 +00:00
James Allen
af85c83877 Buffer updates when only a single user is editing a document
Add in 5 second delay between flushing updates when only a single user
is editing a document. As soon as an update is received from another user
we switch to sending updates immediately again so there is no latency
between collaborators. The logic applies to individual docs, so two users
can be editing different docs and will still buffer updates since they
will not affect each other.
2015-04-17 11:24:28 +01:00
James Allen
9f1a7c7396 Send source of update to doc updater and allow external updates to be ignored in UI 2014-10-16 11:27:10 +01:00
James Allen
9e4653d83c Try to clean up to avoid memory leaks 2014-07-09 20:49:10 +01:00
James Allen
8ed03694c3 Add missing files 2014-07-08 12:02:26 +01:00