1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:54:45 -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)
for i := 0; i < 30; i++ {
// body
_, err := Dial(fmt.Sprintf("ws://%s/echo", serverAddr), "",
"http://localhost/")
ws, err := Dial(fmt.Sprintf("ws://%s/echo", serverAddr), "", "http://localhost/")
if err != nil {
panic("Dial failed: " + err.String())
t.Error("Dial failed:", err.String())
break
}
ws.Close()
}
}