mirror of
https://github.com/golang/go
synced 2024-11-25 19:07:57 -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)
|
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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user