close body

This commit is contained in:
luyuhuang 2020-08-13 22:41:45 +08:00
parent 39380dadbc
commit 69f1dc5075

3
ws.go
View File

@ -788,12 +788,13 @@ func websocketClientConn(url string, conn net.Conn, tlsConfig *tls.Config, optio
if err != nil { if err != nil {
return nil, err return nil, err
} }
resp.Body.Close()
if verifyErr != nil { if verifyErr != nil {
c.Close() c.Close()
return nil, verifyErr return nil, verifyErr
} }
resp.Body.Close()
return &websocketConn{conn: c}, nil return &websocketConn{conn: c}, nil
} }