diff --git a/internal/worker.go b/internal/worker.go index 8a98130..d3b258f 100644 --- a/internal/worker.go +++ b/internal/worker.go @@ -134,7 +134,7 @@ func (w *Worker) acceptClientWork(work any) any { } func (w *Worker) AddAcceptClientWork(server *Server, count int) { - for i := 0; i < count; i++ { + for range count { _, err := w.Pond.AddWork(AcceptClient, server) if err != nil { w.Logger.Error("failed to add accept client work", zap.Error(err))