File tree 1 file changed +8
-10
lines changed 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -376,12 +376,11 @@ class PerMessageDeflate {
376
376
this . _inflate [ kTotalLength ]
377
377
) ;
378
378
379
+ this . _inflate [ kTotalLength ] = 0 ;
380
+ this . _inflate [ kBuffers ] = [ ] ;
381
+
379
382
if ( fin && this . params [ `${ endpoint } _no_context_takeover` ] ) {
380
- this . _inflate . close ( ) ;
381
- this . _inflate = null ;
382
- } else {
383
- this . _inflate [ kTotalLength ] = 0 ;
384
- this . _inflate [ kBuffers ] = [ ] ;
383
+ this . _inflate . reset ( ) ;
385
384
}
386
385
387
386
callback ( null , data ) ;
@@ -448,12 +447,11 @@ class PerMessageDeflate {
448
447
//
449
448
this . _deflate [ kCallback ] = null ;
450
449
450
+ this . _deflate [ kTotalLength ] = 0 ;
451
+ this . _deflate [ kBuffers ] = [ ] ;
452
+
451
453
if ( fin && this . params [ `${ endpoint } _no_context_takeover` ] ) {
452
- this . _deflate . close ( ) ;
453
- this . _deflate = null ;
454
- } else {
455
- this . _deflate [ kTotalLength ] = 0 ;
456
- this . _deflate [ kBuffers ] = [ ] ;
454
+ this . _deflate . reset ( ) ;
457
455
}
458
456
459
457
callback ( null , data ) ;
You can’t perform that action at this time.
0 commit comments