websocket: fix socket leak in the case of negotiation failure

Change-Id: Ie5712a49f0c909538f4c36311b591e930a77efb5
Reviewed-on: https://go-review.googlesource.com/5410
Reviewed-by: Andrew Gerrand <adg@golang.org>
diff --git a/websocket/client.go b/websocket/client.go
index ef11a51..20d1e1e 100644
--- a/websocket/client.go
+++ b/websocket/client.go
@@ -103,6 +103,7 @@
 
 	ws, err = NewClient(config, client)
 	if err != nil {
+		client.Close()
 		goto Error
 	}
 	return