mirror of
https://github.com/golang/go
synced 2024-11-22 03:44:39 -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:
parent
99b0eefd40
commit
a58fe3bd23
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user