File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -438,12 +438,17 @@ class ProxyUpgradeHandler {
438
438
this . req = null
439
439
this . resOrSocket = null
440
440
this . onProxyError = null
441
+ this . proxyRes = null
442
+ this . proxySocket = null
441
443
442
444
this . _handle = this . _handle . bind ( this )
443
445
this . _release = this . _release . bind ( this )
444
446
}
445
447
446
448
_handle ( proxyRes , proxySocket , proxyHead ) {
449
+ this . proxyRes = proxyRes
450
+ this . proxySocket = proxySocket
451
+
447
452
try {
448
453
setupSocket ( proxySocket )
449
454
@@ -482,10 +487,14 @@ class ProxyUpgradeHandler {
482
487
483
488
_release ( ) {
484
489
this . req . removeListener ( 'close' , this . _release )
490
+ this . proxyRes . destroy ( )
491
+ this . proxySocket . destroy ( )
485
492
486
493
this . req = null
487
494
this . resOrSocket = null
488
495
this . onProxyError = null
496
+ this . proxyRes = null
497
+ this . proxySocket = null
489
498
ProxyUpgradeHandler . pool . push ( this )
490
499
}
491
500
You can’t perform that action at this time.
0 commit comments