This repository was archived by the owner on Feb 1, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -74,14 +74,6 @@ scripts List application scripts that are currently loaded
7474scripts(true) List all scripts (including node-internals)
7575` . trim ( ) ;
7676
77- function throwUnexpectedError ( error ) {
78- process . nextTick ( ( ) => { throw error ; } ) ;
79- }
80-
81- function delay ( ms ) {
82- return new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
83- }
84-
8577const ProtocolClient = ( function setupClient ( ) {
8678 const kOpCodeText = 0x1 ;
8779 const kOpCodeClose = 0x8 ;
@@ -1356,7 +1348,7 @@ class NodeInspector {
13561348 } ) ;
13571349 this . paused = false ;
13581350 } )
1359- . then ( null , throwUnexpectedError ) ;
1351+ . then ( null , ( error ) => process . nextTick ( ( ) => { throw error ; } ) ) ;
13601352 }
13611353
13621354 suspendReplWhile ( fn ) {
@@ -1370,7 +1362,7 @@ class NodeInspector {
13701362 this . repl . rli . resume ( ) ;
13711363 this . repl . displayPrompt ( ) ;
13721364 this . stdin . resume ( ) ;
1373- } ) . then ( null , throwUnexpectedError ) ;
1365+ } ) . then ( null , ( error ) => process . nextTick ( ( ) => { throw error ; } ) ) ;
13741366 }
13751367
13761368 killChild ( ) {
@@ -1401,7 +1393,8 @@ class NodeInspector {
14011393 this . stdout . write ( ' failed to connect, please retry\n' ) ;
14021394 process . exit ( 1 ) ;
14031395 }
1404- return delay ( 500 ) . then ( ( ) => attemptConnect ( ) ) ;
1396+
1397+ return new Promise ( ( resolve ) => setTimeout ( resolve , 500 ) ) . then ( attemptConnect ) ;
14051398 } ) ;
14061399 } ;
14071400
You can’t perform that action at this time.
0 commit comments