end on end
This commit is contained in:
parent
70cd098a83
commit
c98b9489fa
5
index.js
5
index.js
|
@ -263,6 +263,7 @@ module.exports = class Protomux {
|
|||
this._notify = new Map()
|
||||
|
||||
this.stream.on('data', this._ondata.bind(this))
|
||||
this.stream.on('end', this._onend.bind(this))
|
||||
this.stream.on('error', noop) // we handle this in "close"
|
||||
this.stream.on('close', this._shutdown.bind(this))
|
||||
}
|
||||
|
@ -393,6 +394,10 @@ module.exports = class Protomux {
|
|||
}
|
||||
}
|
||||
|
||||
_onend () { // TODO: support half open mode for the users who wants that here
|
||||
this.stream.end()
|
||||
}
|
||||
|
||||
_decode (remoteId, state) {
|
||||
const type = c.uint.decode(state)
|
||||
|
||||
|
|
Reference in New Issue