Selaa lähdekoodia

Proactively clean up HTTP proxy resources

Rod Hynes 11 vuotta sitten
vanhempi
sitoutus
0f0fb84bf1
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      psiphon/httpProxy.go

+ 1 - 0
psiphon/httpProxy.go

@@ -70,6 +70,7 @@ func NewHttpProxy(listenPort int, tunnel *Tunnel, stoppedSignal chan struct{}) (
 func (proxy *HttpProxy) Close() {
 	proxy.listener.Close()
 	proxy.waitGroup.Wait()
+	proxy.httpRelay.CloseIdleConnections()
 }
 
 // ServeHTTP receives HTTP requests and proxies them. CONNECT requests