1
0
mirror of https://github.com/golang/go synced 2024-11-25 21:47:59 -07:00

websocket: fix socket leak in test

Possibly fixes issue 1694.

R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4427049
This commit is contained in:
Dave Cheney 2011-04-17 09:43:27 -07:00 committed by Brad Fitzpatrick
parent 99b0eefd40
commit a58fe3bd23

View File

@ -186,11 +186,12 @@ func TestTrailingSpaces(t *testing.T) {
once.Do(startServer) once.Do(startServer)
for i := 0; i < 30; i++ { for i := 0; i < 30; i++ {
// body // body
_, err := Dial(fmt.Sprintf("ws://%s/echo", serverAddr), "", ws, err := Dial(fmt.Sprintf("ws://%s/echo", serverAddr), "", "http://localhost/")
"http://localhost/")
if err != nil { if err != nil {
panic("Dial failed: " + err.String()) t.Error("Dial failed:", err.String())
break
} }
ws.Close()
} }
} }