From 916dfe65e4afe636ce42e178fe88815b4b86026d Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sun, 8 Mar 2015 16:13:29 +0100 Subject: another attempt to fix disconnect issues --- threads.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'threads.js') diff --git a/threads.js b/threads.js index 165c7fc..d8ec04f 100644 --- a/threads.js +++ b/threads.js @@ -1302,15 +1302,13 @@ Process.prototype.sendPeerMessage = function (message, peer) { var stage = this.homeContext.receiver.parentThatIsA(StageMorph), ide = this.homeContext.receiver.parentThatIsA(IDE_Morph); - console.log(peer, stage.peerId); if (peer instanceof List) { peer.asArray().forEach(function (singlePeer) { myself.sendPeerMessage(message, singlePeer); }); return; } - if (peer == stage.peerId) { - console.log('hello self!'); + if (peer == stage.peer.id) { stage.newPeerMessage(message, peer); return; } @@ -1348,7 +1346,7 @@ Process.prototype.reportPeerList = function () { Process.prototype.reportPeerId = function () { var stage = this.homeContext.receiver.parentThatIsA(StageMorph); - return stage.peerId; + return stage.peer.id; }; // Process lists primitives -- cgit v1.3.1