You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a Transport falls out of scope with idle connections, it will leak.
This is surprising for users (for example #24719), and obscure/inconsistent. os.File closes resources when falling out of scope, and Transport doesn't even have a Close method, only CloseIdleConnections. Idle connections are an implementation detail.
Implementing a finalizer would require making sure that all blocked goroutines don't keep pointers to the Transport itself, which might be hard.