mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
collab_client: Redo server message queueing
Move server message queue processing out of `handleUserChanges()` for the following reasons: * Fix a race condition: Before this change the client would stop processing incoming messages and stop sending changes to the server if a `NEW_CHANGES` message arrived while the user was composing a character and waiting for an `ACCEPT_COMMIT` message. * Improve readability: The `handleUserChanges()` function is for handling changes from the local user, not for handling changes from other users. * Simplify the code.
This commit is contained in:
parent
e99fe88537
commit
63a1f078f4
3 changed files with 75 additions and 115 deletions
|
@ -141,7 +141,7 @@ const Ace2Editor = function () {
|
|||
this.getDebugProperty = (prop) => info.ace_getDebugProperty(prop);
|
||||
|
||||
this.getInInternationalComposition =
|
||||
() => loaded ? info.ace_getInInternationalComposition() : false;
|
||||
() => loaded ? info.ace_getInInternationalComposition() : null;
|
||||
|
||||
// prepareUserChangeset:
|
||||
// Returns null if no new changes or ACE not ready. Otherwise, bundles up all user changes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue