Merge remote-tracking branch 'origin/communities-allow-list' into communities-allow

This commit is contained in:
yflory
2020-02-19 16:00:11 +01:00
10 changed files with 503 additions and 134 deletions

View File

@@ -68,6 +68,19 @@
};
};
Util.mkTimeout = function (_f, ms) {
ms = ms || 0;
var f = Util.once(_f);
var timeout = setTimeout(function () {
f('TIMEOUT');
}, ms);
return Util.both(f, function () {
clearTimeout(timeout);
});
};
Util.response = function () {
var pending = {};
var timeouts = {};