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 {
438438 this . req = null
439439 this . resOrSocket = null
440440 this . onProxyError = null
441+ this . proxyRes = null
442+ this . proxySocket = null
441443
442444 this . _handle = this . _handle . bind ( this )
443445 this . _release = this . _release . bind ( this )
444446 }
445447
446448 _handle ( proxyRes , proxySocket , proxyHead ) {
449+ this . proxyRes = proxyRes
450+ this . proxySocket = proxySocket
451+
447452 try {
448453 setupSocket ( proxySocket )
449454
@@ -482,10 +487,14 @@ class ProxyUpgradeHandler {
482487
483488 _release ( ) {
484489 this . req . removeListener ( 'close' , this . _release )
490+ this . proxyRes . destroy ( )
491+ this . proxySocket . destroy ( )
485492
486493 this . req = null
487494 this . resOrSocket = null
488495 this . onProxyError = null
496+ this . proxyRes = null
497+ this . proxySocket = null
489498 ProxyUpgradeHandler . pool . push ( this )
490499 }
491500
You can’t perform that action at this time.
0 commit comments