As I can see from the comment of http.Transport : // Transports should be reused instead of created as needed.
The comment telled me that I need reuse the transports. But i am writing a rpc system that the caller can pass different dialler to make http request. It almost impossible for my rpc package implementer to reuse the transports object. And the caller of my rpc package do not want to reuse the object either. So the workaround to those complex stuff is to disable the keep alive in http.Transport by default(the caller can open it if them reuse the object). So How can I simplify this reuse stuff? If I disable keepAlive, can http.Transport be gc? * If I store the transports in an map, I can not know which dialler is same as another. * I can set the IdleConnTimeout to 60*time.Second.But I looks useless if the callers just create new object again and again. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.