File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ const EventEmitter = require('events')
33const once = require ( 'once' )
44const parallel = require ( 'run-parallel' )
55const Peer = require ( 'simple-peer' )
6+ const queueMicrotask = require ( 'queue-microtask' )
67
78const common = require ( './lib/common' )
89const HTTPTracker = require ( './lib/client/http-tracker' ) // empty object in browser
@@ -76,7 +77,7 @@ class Client extends EventEmitter {
7677 const webrtcSupport = this . _wrtc !== false && ( ! ! this . _wrtc || Peer . WEBRTC_SUPPORT )
7778
7879 const nextTickWarn = err => {
79- process . nextTick ( ( ) => {
80+ queueMicrotask ( ( ) => {
8081 this . emit ( 'warning' , err )
8182 } )
8283 }
Original file line number Diff line number Diff line change 3434 "lru" : " ^3.1.0" ,
3535 "minimist" : " ^1.2.5" ,
3636 "once" : " ^1.4.0" ,
37+ "queue-microtask" : " ^1.2.2" ,
3738 "random-iterate" : " ^1.0.1" ,
3839 "randombytes" : " ^2.1.0" ,
3940 "run-parallel" : " ^1.1.9" ,
You can’t perform that action at this time.
0 commit comments