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 cbd1ca8 commit e3c9537Copy full SHA for e3c9537
src/net/http/transport_test.go
@@ -5270,7 +5270,6 @@ func TestMissingStatusNoPanic(t *testing.T) {
5270
5271
ln := newLocalListener(t)
5272
addr := ln.Addr().String()
5273
- shutdown := make(chan bool, 1)
5274
done := make(chan bool)
5275
fullAddrURL := fmt.Sprintf("http://%s", addr)
5276
raw := "HTTP/1.1 400\r\n" +
@@ -5282,10 +5281,7 @@ func TestMissingStatusNoPanic(t *testing.T) {
5282
5281
"Aloha Olaa"
5283
5284
go func() {
5285
- defer func() {
5286
- ln.Close()
5287
- close(done)
5288
- }()
+ defer close(done)
5289
5290
conn, _ := ln.Accept()
5291
if conn != nil {
@@ -5316,7 +5312,7 @@ func TestMissingStatusNoPanic(t *testing.T) {
5316
5312
t.Errorf("got=%v want=%q", err, want)
5317
5313
}
5318
5314
5319
- close(shutdown)
5315
+ ln.Close()
5320
<-done
5321
5322
0 commit comments