lib/ingestserver: typo fix after f7834767c1

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4922
This commit is contained in:
Aliaksandr Valialkin 2023-11-14 03:25:10 +01:00
parent 7cf7740d18
commit f9bd265249
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -46,7 +46,7 @@ func (cm *ConnsMap) Delete(c net.Conn) {
// CloseAll gradually closes all the cm conns with during the given shutdownDuration.
func (cm *ConnsMap) CloseAll(shutdownDuration time.Duration) {
cm.mu.Lock()
conns := make([]net.Conn, len(cm.m))
conns := make([]net.Conn, 0, len(cm.m))
for c := range cm.m {
conns = append(conns, c)
delete(cm.m, c)