Commit 13b0908e authored by Mikio Hara's avatar Mikio Hara

websocket: fix socket leak in the case of negotiation failure

Change-Id: Ie5712a49f0c909538f4c36311b591e930a77efb5
Reviewed-on: https://go-review.googlesource.com/5410Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
parent 6dc0abcc
......@@ -103,6 +103,7 @@ func DialConfig(config *Config) (ws *Conn, err error) {
ws, err = NewClient(config, client)
if err != nil {
client.Close()
goto Error
}
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment