MCPcopy
hub / github.com/segmentio/kafka-go / closeIdleConns

Method closeIdleConns

transport.go:970–980  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

968}
969
970func (g *connGroup) closeIdleConns() {
971 g.mutex.Lock()
972 conns := g.idleConns
973 g.idleConns = nil
974 g.closed = true
975 g.mutex.Unlock()
976
977 for _, c := range conns {
978 c.close()
979 }
980}
981
982func (g *connGroup) grabConnOrConnect(ctx context.Context) (*conn, error) {
983 rslv := g.pool.resolver

Callers 2

unrefMethod · 0.80
updateMethod · 0.80

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected