Make sure the realtime is synced with onSettle when using cryptget

pull/1/head
yflory 8 years ago
parent fadddb297c
commit 66dc166936

@ -70,10 +70,16 @@ define([
TextPatcher.create({
realtime: realtime,
})(doc);
realtime.sync();
realtime.abort();
var to = window.setTimeout(function () {
cb(new Error("Timeout"));
}, 5000);
Cryptpad.whenRealtimeSyncs(realtime, function () {
window.clearTimeout(to);
realtime.abort();
finish(Session, void 0);
});
};
overwrite(config, opt);

Loading…
Cancel
Save