From 3cc4807c2aaaa843164bd9be22904181b2e3c17b Mon Sep 17 00:00:00 2001 From: Eric Guan Date: Tue, 16 Apr 2019 19:25:42 -0700 Subject: Adds timeout option to requestIdleCallback --- lib/torrent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/torrent.js') 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) } -- cgit v1.2.3