net
net copied to clipboard
http2: export CloseIdleConnections in client connection pool
http2 transport allows stub of ClientConnPool
, but both clientConnPoolIdleCloser
interface and its closeIdleConnections()
method are private. This makes the stubbed ClientConnPool
implementation not able to implement closeIdleConnections()
. As a result, it will be a no-op when
the transport call transport.CloseIdleConnections()
.
Therefore, exporting CloseIdleConnections()
method is needed. Exporting ClientConnPoolIdleCloser
interface is technically not needed, but it makes the API contract more explicit, and allows the stubbed implementation to do something like:
_ http2.ClientConnPoolIdleCloser = (*clientConnPool)(nil)
This PR (HEAD: 3a03f300f6114d142539c2c74255ae61b7019483) has been imported to Gerrit for code review.
Please visit https://go-review.googlesource.com/c/net/+/233938 to see it.
Tip: You can toggle comments from me using the comments
slash command (e.g. /comments off
)
See the Wiki page for more info