simplifying it
@@ -93,12 +93,9 @@ func NewTransportWithParams(o Params) *Transport {
if o.CloseIdleConnsPeriod > 0 {
go func() {
- for {
- select {
- case <-time.After(o.CloseIdleConnsPeriod):
+ for range time.After(o.CloseIdleConnsPeriod) {
tr.CloseIdleConnections()
}
- }
}()
}
