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:
authorEric Guan <guanzo91@gmail.com>2019-04-17 05:25:42 +0300
committerEric Guan <guanzo91@gmail.com>2019-04-17 05:25:42 +0300
commit3cc4807c2aaaa843164bd9be22904181b2e3c17b (patch)
tree0323095d62a181f8872d5a90dd264b8a2251e0d0 /lib/torrent.js
parentf8923a66a8b1178a412b067bc913e267025b3d57 (diff)
Adds timeout option to requestIdleCallback
Diffstat (limited to 'lib/torrent.js')
-rw-r--r--lib/torrent.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 8f667ff..f50c107 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -1146,7 +1146,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)
}