File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/client/lib/client Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -412,6 +412,10 @@ export default class RedisCommandsQueue {
412
412
RedisCommandsQueue . #removeAbortListener( toSend ) ;
413
413
toSend . abort = undefined ;
414
414
}
415
+ if ( toSend . timeout ) {
416
+ RedisCommandsQueue . #removeTimeoutListener( toSend ) ;
417
+ toSend . timeout = undefined ;
418
+ }
415
419
this . #chainInExecution = toSend . chainId ;
416
420
toSend . chainId = undefined ;
417
421
this . #waitingForReply. push ( toSend ) ;
@@ -432,10 +436,17 @@ export default class RedisCommandsQueue {
432
436
command . abort ! . signal . removeEventListener ( 'abort' , command . abort ! . listener ) ;
433
437
}
434
438
439
+ static #removeTimeoutListener( command : CommandToWrite ) {
440
+ command . timeout ! . signal . removeEventListener ( 'abort' , command . timeout ! . listener ) ;
441
+ }
442
+
435
443
static #flushToWrite( toBeSent : CommandToWrite , err : Error ) {
436
444
if ( toBeSent . abort ) {
437
445
RedisCommandsQueue . #removeAbortListener( toBeSent ) ;
438
446
}
447
+ if ( toBeSent . timeout ) {
448
+ RedisCommandsQueue . #removeTimeoutListener( toBeSent ) ;
449
+ }
439
450
440
451
toBeSent . reject ( err ) ;
441
452
}
You can’t perform that action at this time.
0 commit comments