x/net/http2: finish Transport.IdleConnTimeout #16808
Comments
I ran into this issue today. My use case is such where for each test I setup my own transport and http.Client, perform a request, then let the transport/client run out of scope, never to be used again. My application was running out of file descriptors and digging deeper brought me here. Code to reproduce issue: https://gist.github.com/sajal/cada559fea365fc2f7468a6e40e82e4b With http2 disabled(
|
Also to add, for my usecase the workaround is to |
@sajal, that's not just the workaround; that's what you should always do when letting a Transport go out of scope. But this still needs to be fixed. |
Tests will be in the go repo's net/http package when this package is re-bundled into std. Updates golang/go#16808 (fixes after bundle into std) Change-Id: Iad31dc120bc008b1e9679bf7b2b988aac9c893c8 Reviewed-on: https://go-review.googlesource.com/30075 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Go 1.7 added:
But I don't think the http2.Transport entirely respects it. Make sure it does.
The text was updated successfully, but these errors were encountered: