Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/file-stream.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/file-stream.js b/lib/file-stream.js
index bd9728d..f9cd462 100644
--- a/lib/file-stream.js
+++ b/lib/file-stream.js
@@ -85,11 +85,7 @@ class FileStream extends stream.Readable {
this._piece += 1
}
- destroy (onclose) {
- this._destroy(null, onclose)
- }
-
- _destroy (err, onclose) {
+ _destroy (err) {
if (this.destroyed) return
this.destroyed = true
@@ -99,7 +95,6 @@ class FileStream extends stream.Readable {
if (err) this.emit('error', err)
this.emit('close')
- if (onclose) onclose()
}
}