We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0410005 commit 1613be8Copy full SHA for 1613be8
src/net/http/transport_test.go
@@ -5314,7 +5314,6 @@ func TestMissingStatusNoPanic(t *testing.T) {
5314
5315
ln := newLocalListener(t)
5316
addr := ln.Addr().String()
5317
- shutdown := make(chan bool, 1)
5318
done := make(chan bool)
5319
fullAddrURL := fmt.Sprintf("http://%s", addr)
5320
raw := "HTTP/1.1 400\r\n" +
@@ -5326,10 +5325,7 @@ func TestMissingStatusNoPanic(t *testing.T) {
5326
5325
"Aloha Olaa"
5327
5328
go func() {
5329
- defer func() {
5330
- ln.Close()
5331
- close(done)
5332
- }()
+ defer close(done)
5333
5334
conn, _ := ln.Accept()
5335
if conn != nil {
@@ -5360,7 +5356,7 @@ func TestMissingStatusNoPanic(t *testing.T) {
5360
5356
t.Errorf("got=%v want=%q", err, want)
5361
5357
}
5362
5358
5363
- close(shutdown)
5359
+ ln.Close()
5364
<-done
5365
5366
0 commit comments