Skip to content

Commit

Permalink
remove defer and close
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Abboud committed Jun 17, 2021
1 parent d17a02e commit 0e62859
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions conjure-go-client/httpclient/http2_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ func testProxy(t *testing.T, readIdleTimeout, pingTimeout time.Duration, expecte
u, err := url.Parse(ts.URL)
require.NoError(t, err)
proxy := newProxyServer(t, u.Host)
defer func() {
require.NoError(t, proxy.ln.Close())
}()
stopCh := make(chan struct{})
go proxy.serve(t, stopCh, false)

Expand Down Expand Up @@ -111,6 +108,7 @@ func testProxy(t *testing.T, readIdleTimeout, pingTimeout time.Duration, expecte
require.Equal(t, expectedRespBody, actualResp)
}
require.Equal(t, expectedDials, proxy.DialCount())
require.NoError(t, proxy.ln.Close())
}

type proxyServer struct {
Expand Down

0 comments on commit 0e62859

Please sign in to comment.