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 9ff1ee333f
commit 3a487666ca
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. // CloseAll gradually closes all the cm conns with during the given shutdownDuration.
func (cm *ConnsMap) CloseAll(shutdownDuration time.Duration) { func (cm *ConnsMap) CloseAll(shutdownDuration time.Duration) {
cm.mu.Lock() cm.mu.Lock()
conns := make([]net.Conn, len(cm.m)) conns := make([]net.Conn, 0, len(cm.m))
for c := range cm.m { for c := range cm.m {
conns = append(conns, c) conns = append(conns, c)
delete(cm.m, c) delete(cm.m, c)