diff options
author | John McLear <john@mclear.co.uk> | 2013-09-28 23:38:26 -0700 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2013-09-28 23:38:26 -0700 |
commit | f59df2bb80f0d4b3c2ff1795d08e3dcef140dd63 (patch) | |
tree | 7580bcc9c875655e83bf19b36d52cda7bdc1e981 | |
parent | e573461c9b34f1a4a132bf0c44220a3b60cbb7df (diff) | |
parent | 7f7d506ff34b4d7477c31290e8bc363f9265bb10 (diff) | |
download | etherpad-lite-f59df2bb80f0d4b3c2ff1795d08e3dcef140dd63.zip |
Merge pull request #1902 from ether/fix/handle-message-continuation
Don't stop processing changesets if there is an error
-rw-r--r-- | src/node/handler/PadMessageHandler.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 7d293926..a79d2410 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -617,7 +617,7 @@ function handleUserChanges(data, cb) // There is an error in this changeset, so just refuse it console.warn("Can't apply USER_CHANGES "+changeset+", because: "+e); client.json.send({disconnect:"badChangeset"}); - return; + return callback(); } //ex. adoptChangesetAttribs @@ -653,7 +653,7 @@ function handleUserChanges(data, cb) }catch(e){ console.warn("Can't apply USER_CHANGES "+changeset+", possibly because of mismatched follow error"); client.json.send({disconnect:"badChangeset"}); - return; + return callback(); } if ((r - baseRev) % 200 == 0) { // don't let the stack get too deep @@ -676,8 +676,7 @@ function handleUserChanges(data, cb) { console.warn("Can't apply USER_CHANGES "+changeset+" with oldLen " + Changeset.oldLen(changeset) + " to document of length " + prevText.length); client.json.send({disconnect:"badChangeset"}); - callback(); - return; + return callback(); } pad.appendRevision(changeset, thisSession.author); |