diff options
-rw-r--r-- | lib/file-stream.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/file-stream.js b/lib/file-stream.js index b499754..e7dee68 100644 --- a/lib/file-stream.js +++ b/lib/file-stream.js @@ -59,7 +59,7 @@ class FileStream extends stream.Readable { if (this._notifying) return this._notifying = true - if (this._torrent.destroyed) return this._destroy(new Error('Torrent removed')) + if (this._torrent.destroyed) return this.destroy(new Error('Torrent removed')) const p = this._piece @@ -73,7 +73,7 @@ class FileStream extends stream.Readable { if (this.destroyed) return debug('read %s (length %s) (err %s)', p, buffer && buffer.length, err && err.message) - if (err) return this._destroy(err) + if (err) return this.destroy(err) if (this._offset) { buffer = buffer.slice(this._offset) |