From 6fc683dcaabac09857d613c716b4358492dde0aa Mon Sep 17 00:00:00 2001 From: Matias Pando Date: Thu, 4 Sep 2014 17:47:24 -0300 Subject: [PATCH] Bug found that stops sending message --- js/models/network/Async.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/models/network/Async.js b/js/models/network/Async.js index b15ce9087..19cf047aa 100644 --- a/js/models/network/Async.js +++ b/js/models/network/Async.js @@ -340,6 +340,7 @@ Network.prototype.getCopayerIds = function() { Network.prototype.send = function(dest, payload, cb) { + preconditions.checkState(this.socket); preconditions.checkArgument(payload); var self = this; @@ -357,7 +358,8 @@ Network.prototype.send = function(dest, payload, cb) { var to = dest[ii]; if (to == this.copayerId) continue; - log.debug('SEND to: ' + to, this.copayerId, payload); + + log.debug('SEND to: ' + to, this.copayerId, JSON.stringify(payload)); var message = this.encode(to, payload); this.socket.emit('message', message);