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.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 5f86228..610b280 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -45,7 +45,8 @@ const PIPELINE_MAX_DURATION = 1
const RECHOKE_INTERVAL = 10000 // 10 seconds
const RECHOKE_OPTIMISTIC_DURATION = 2 // 30 seconds
-const FILESYSTEM_CONCURRENCY = 2
+// IndexedDB chunk stores used in the browser benefit from maximum concurrency
+const FILESYSTEM_CONCURRENCY = process.browser ? Infinity : 2
const RECONNECT_WAIT = [ 1000, 5000, 15000 ]
@@ -459,7 +460,8 @@ class Torrent extends EventEmitter {
length: file.length,
offset: file.offset
})),
- length: this.length
+ length: this.length,
+ name: this.infoHash
})
)