diff --git a/server/proxy/http.go b/server/proxy/http.go index 73507ee9..af4ad805 100644 --- a/server/proxy/http.go +++ b/server/proxy/http.go @@ -129,8 +129,9 @@ func (s *httpServer) handleHttp(c *conn.Conn, r *http.Request) { ) defer func() { if connClient != nil { - s.writeConnFail(c.Conn) connClient.Close() + }else { + s.writeConnFail(c.Conn) } c.Close() }()