cnlh 5 years ago
parent
commit
8dabf5af1d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      server/proxy/http.go

+ 2 - 1
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()
 	}()