diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2019-09-07 20:41:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-07 20:41:41 +0300 |
commit | e5a3a918792040d5d9014d07e4cebbb9e4652291 (patch) | |
tree | 6e8511da2b9fa7c0cc0ff4c5bcf8a4939f14ce8c | |
parent | 9dac9cfdef56d2268c28c78c92e956914d2c9593 (diff) | |
parent | 3cc4807c2aaaa843164bd9be22904181b2e3c17b (diff) |
Merge pull request #1615 from guanzo/requestIdleCallback
Adds timeout option to requestIdleCallback
-rw-r--r-- | lib/torrent.js | 2 |
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) } |