From 4a7f45113a82e6df6ba643bafe45fd7653ea2ed6 Mon Sep 17 00:00:00 2001 From: v2ray Date: Mon, 4 Jan 2016 01:13:43 +0100 Subject: [PATCH] check accepting in http --- proxy/http/http.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proxy/http/http.go b/proxy/http/http.go index dedff2f50..119001746 100644 --- a/proxy/http/http.go +++ b/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 {