Fix duplicate text bug on reconnect or ACK timeout

This commit is contained in:
yflory
2020-03-16 11:19:04 +01:00
parent a2b6501adb
commit 27c1291182
3 changed files with 11 additions and 6 deletions

View File

@@ -59,10 +59,11 @@ define([
logLevel: logLevel
});
chainpad.onMessage(function(message, cb) {
// -1 ==> no timeout, we may receive the callback only when we reconnect
sframeChan.query('Q_RT_MESSAGE', message, function (err) {
if (!err) { evPatchSent.fire(); }
cb(err);
});
}, { timeout: -1 });
});
chainpad.onPatch(function () {
onRemote({ realtime: chainpad });