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

@@ -879,7 +879,8 @@ define([
postMessage("LEAVE_PAD", data, cb);
};
pad.sendPadMsg = function (data, cb) {
postMessage("SEND_PAD_MSG", data, cb);
// -1 ==> no timeout, we may receive the callback only when we reconnect
postMessage("SEND_PAD_MSG", data, cb, { timeout: -1 });
};
pad.onReadyEvent = Util.mkEvent();
pad.onMessageEvent = Util.mkEvent();