Merge branch 'duplicateText2' into staging
This commit is contained in:
@@ -1596,7 +1596,10 @@ define([
|
||||
onConnect: function (wc, sendMessage) {
|
||||
channel.sendMessage = function (msg, cId, cb) {
|
||||
// Send to server
|
||||
sendMessage(msg, function () {
|
||||
sendMessage(msg, function (err) {
|
||||
if (err) {
|
||||
return void cb({ error: err });
|
||||
}
|
||||
// Broadcast to other tabs
|
||||
channel.pushHistory(CpNetflux.removeCp(msg), /^cp\|/.test(msg));
|
||||
channel.bcast("PAD_MESSAGE", {
|
||||
|
||||
@@ -45,10 +45,13 @@ define([
|
||||
var txid = mkTxid();
|
||||
opts = opts || {};
|
||||
var to = opts.timeout || 30000;
|
||||
var timeout = setTimeout(function () {
|
||||
delete queries[txid];
|
||||
cb('TIMEOUT');
|
||||
}, to);
|
||||
var timeout;
|
||||
if (to > 0) {
|
||||
timeout = setTimeout(function () {
|
||||
delete queries[txid];
|
||||
cb('TIMEOUT');
|
||||
}, to);
|
||||
}
|
||||
acks[txid] = function (err) {
|
||||
clearTimeout(timeout);
|
||||
delete acks[txid];
|
||||
|
||||
Reference in New Issue
Block a user