File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -356,18 +356,17 @@ class Pool extends EventEmitter {
356356 if ( isExpired ) {
357357 this . log ( 'remove expired client' )
358358 this . _expired . delete ( client )
359- this . _remove ( client , this . _pulseQueue . bind ( this ) )
360- return
359+ return this . _remove ( client , this . _pulseQueue . bind ( this ) )
361360 }
362361
363362 // idle timeout
364363 let tid
365364 if ( this . options . idleTimeoutMillis ) {
366365 tid = setTimeout ( ( ) => {
367366 this . log ( 'remove idle client' )
368- this . _remove ( client )
367+ this . _remove ( client , this . _pulseQueue . bind ( this ) )
369368 } , this . options . idleTimeoutMillis )
370-
369+
371370 if ( this . options . allowExitOnIdle ) {
372371 // allow Node to exit if this is all that's left
373372 tid . unref ( )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ describe('idle timeout', () => {
5050 try {
5151 yield Promise . race ( [ removal , timeout ] )
5252 } finally {
53- pool . end ( )
53+ yield pool . end ( )
5454 }
5555 } )
5656 )
You can’t perform that action at this time.
0 commit comments