Fix race condition

This commit is contained in:
yflory
2018-06-06 18:21:52 +02:00
parent 48dc8c78b4
commit 78ff55e34e
2 changed files with 6 additions and 5 deletions

View File

@@ -858,6 +858,7 @@ define([
});
postMessage = function (cmd, data, cb) {
cb = cb || function () {}
chan.query(cmd, data, function (err, data) {
if (err) { return void cb ({error: err}); }
cb(data);