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:
authorDiego Rodríguez Baquero <diegorbaquero@gmail.com>2018-08-29 17:57:28 +0300
committerGitHub <noreply@github.com>2018-08-29 17:57:28 +0300
commit06379b5171060716c5b83062e5caa59b6fe1969b (patch)
tree9cfaf0e7f6774bbf8d0d86dc8e2dc09b01f83db2 /lib
parent49a005b4e63e56bee1f8b1400f9a2c18bc5ead0a (diff)
parent1479c3a422f4727f42a06e45269bea6024be262e (diff)
Merge pull request #1456 from KayleePop/idbkv-chunk-store
File system concurrency in the browser and name passed to the store
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
})
)