{control,net}: close idle connections of custom transports

I noticed a few places with custom http.Transport where we are not
closing idle connections when transport is no longer used.

Updates tailscale/corp#21609

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov
2024-08-03 13:44:26 +01:00
committed by Anton Tolchanov
parent e3f047618b
commit 227509547f
3 changed files with 5 additions and 0 deletions

View File

@@ -166,6 +166,7 @@ func (d *Dialer) Close() error {
c.Close()
}
d.activeSysConns = nil
d.PeerAPITransport().CloseIdleConnections()
return nil
}