Selaa lähdekoodia

check accepting in http

v2ray 9 vuotta sitten
vanhempi
commit
4a7f45113a
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      proxy/http/http.go

+ 3 - 0
proxy/http/http.go

@@ -59,6 +59,9 @@ func (this *HttpProxyServer) Listen(port v2net.Port) error {
 func (this *HttpProxyServer) accept() {
 	for this.accepting {
 		retry.Timed(100 /* times */, 100 /* ms */).On(func() error {
+			if !this.accepting {
+				return nil
+			}
 			this.Lock()
 			defer this.Unlock()
 			if this.tcpListener != nil {