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
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/torrent.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 930304f..3760db2 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -1599,7 +1599,9 @@ class Torrent extends EventEmitter {
self._reservations[index] = null
self.bitfield.set(index, true)
- self.store.put(index, buf)
+ self.store.put(index, buf, err => {
+ if (err) self._destroy(err)
+ })
self.wires.forEach(wire => {
wire.have(index)