remove getStreamError
This commit is contained in:
parent
dce95a5a4f
commit
2749367bb5
|
|
@ -1,4 +1,4 @@
|
||||||
const { Writable, Readable, getStreamError } = require('stream')
|
const { Writable, Readable } = require('stream')
|
||||||
const headers = require('./headers')
|
const headers = require('./headers')
|
||||||
|
|
||||||
const EMPTY = Buffer.alloc(0)
|
const EMPTY = Buffer.alloc(0)
|
||||||
|
|
@ -78,10 +78,6 @@ class Source extends Readable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_predestroy () {
|
|
||||||
this._parent.destroy(getStreamError(this))
|
|
||||||
}
|
|
||||||
|
|
||||||
_detach () {
|
_detach () {
|
||||||
if (this._parent._stream === this) {
|
if (this._parent._stream === this) {
|
||||||
this._parent._stream = null
|
this._parent._stream = null
|
||||||
|
|
@ -91,6 +87,7 @@ class Source extends Readable {
|
||||||
}
|
}
|
||||||
|
|
||||||
_destroy (err, cb) {
|
_destroy (err, cb) {
|
||||||
|
this._parent.destroy(err)
|
||||||
this._detach()
|
this._detach()
|
||||||
cb(null)
|
cb(null)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue