Fix port stream end bug

Emitting `end` or `close` was not ending the stream.

Pushing a null packet also closes a stream, so I did that instead.

Fixes #616
feature/default_network_editable
Dan Finlay 8 years ago
parent b13eaaa0cd
commit e10c651db0
  1. 3
      app/scripts/lib/port-stream.js

@ -30,8 +30,7 @@ PortDuplexStream.prototype._onMessage = function (msg) {
PortDuplexStream.prototype._onDisconnect = function () {
try {
// this.end()
this.emit('close')
this.push(null)
} catch (err) {
this.emit('error', err)
}

Loading…
Cancel
Save