File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/client/lib/client Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,11 @@ export default class RedisCommandsQueue {
299
299
} ) ;
300
300
}
301
301
302
+ resetDecoder ( ) {
303
+ this . #resetDecoderCallbacks( ) ;
304
+ this . decoder . reset ( ) ;
305
+ }
306
+
302
307
#resetFallbackOnReply?: Decoder [ 'onReply' ] ;
303
308
304
309
async reset < T extends TypeMapping > ( typeMapping ?: T ) {
@@ -384,7 +389,7 @@ export default class RedisCommandsQueue {
384
389
}
385
390
386
391
flushWaitingForReply ( err : Error ) : void {
387
- this . decoder . reset ( ) ;
392
+ this . resetDecoder ( ) ;
388
393
this . #pubSub. reset ( ) ;
389
394
390
395
this . #flushWaitingForReply( err ) ;
@@ -402,7 +407,7 @@ export default class RedisCommandsQueue {
402
407
}
403
408
404
409
flushAll ( err : Error ) : void {
405
- this . decoder . reset ( ) ;
410
+ this . resetDecoder ( ) ;
406
411
this . #pubSub. reset ( ) ;
407
412
this . #flushWaitingForReply( err ) ;
408
413
for ( const node of this . #toWrite) {
Original file line number Diff line number Diff line change @@ -429,7 +429,7 @@ export default class RedisClient<
429
429
try {
430
430
this . #queue. decoder . write ( chunk ) ;
431
431
} catch ( err ) {
432
- this . #queue. decoder . reset ( ) ;
432
+ this . #queue. resetDecoder ( ) ;
433
433
this . emit ( 'error' , err ) ;
434
434
}
435
435
} )
@@ -899,6 +899,7 @@ export default class RedisClient<
899
899
async reset ( ) {
900
900
const promises = [ this . _self . #queue. reset ( ) ] ;
901
901
this . _self . #handshake( false , promises ) ;
902
+ this . _self . #scheduleWrite( ) ;
902
903
await Promise . all ( promises ) ;
903
904
}
904
905
You can’t perform that action at this time.
0 commit comments