diff options
Diffstat (limited to 'app/scripts/lib/port-stream.js')
-rw-r--r-- | app/scripts/lib/port-stream.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/scripts/lib/port-stream.js b/app/scripts/lib/port-stream.js index a6c974d6d..2644741fc 100644 --- a/app/scripts/lib/port-stream.js +++ b/app/scripts/lib/port-stream.js @@ -31,7 +31,8 @@ PortDuplexStream.prototype._onMessage = function(msg){ PortDuplexStream.prototype._onDisconnect = function(){ try { - this.end() + // this.end() + this.emit('close') } catch(err){ this.emit('error', err) } @@ -54,6 +55,7 @@ PortDuplexStream.prototype._write = function(msg, encoding, cb){ } cb() } catch(err){ + console.error(err) // this.emit('error', err) cb(new Error('PortDuplexStream - disconnected')) } |