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:
authorFeross Aboukhadijeh <feross@feross.org>2019-09-07 20:41:41 +0300
committerGitHub <noreply@github.com>2019-09-07 20:41:41 +0300
commite5a3a918792040d5d9014d07e4cebbb9e4652291 (patch)
tree6e8511da2b9fa7c0cc0ff4c5bcf8a4939f14ce8c
parent9dac9cfdef56d2268c28c78c92e956914d2c9593 (diff)
parent3cc4807c2aaaa843164bd9be22904181b2e3c17b (diff)
Merge pull request #1615 from guanzo/requestIdleCallback
Adds timeout option to requestIdleCallback
-rw-r--r--lib/torrent.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index f56b75c..77cf898 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -1175,7 +1175,7 @@ class Torrent extends EventEmitter {
const self = this
if (typeof window !== 'undefined' && typeof window.requestIdleCallback === 'function') {
- window.requestIdleCallback(function () { self._updateWire(wire) })
+ window.requestIdleCallback(function () { self._updateWire(wire) }, { timeout: 250 })
} else {
self._updateWire(wire)
}