mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-28 12:36:33 +00:00
fix: flush pending changesets immediately after reconnect
After reconnecting, setUpSocket() did not call handleUserChanges(), so any edits made while disconnected were not sent to the server until the user made another change. This caused divergent pad state between users. Now calls handleUserChanges() after reconnect to immediately transmit any pending local changesets. Fixes #5108 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bd73785431
commit
09d81c01a7
1 changed files with 6 additions and 0 deletions
|
|
@ -154,6 +154,12 @@ const getCollabClient = (ace2editor, serverVars, initialUserInfo, options, _pad)
|
|||
doDeferredActions();
|
||||
|
||||
initialStartConnectTime = Date.now();
|
||||
|
||||
// Flush any pending local changes immediately after (re)connect.
|
||||
// Without this, changes made while disconnected are not sent to the
|
||||
// server until the user makes another edit.
|
||||
// See https://github.com/ether/etherpad-lite/issues/5108
|
||||
handleUserChanges();
|
||||
};
|
||||
|
||||
const sendMessage = (msg) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue