diff --git a/workers/worker_group.go b/workers/worker_group.go index 32d0c60..8b4dc4c 100644 --- a/workers/worker_group.go +++ b/workers/worker_group.go @@ -64,7 +64,7 @@ func (group *WorkerGroup) runWorkers( var connection net.Conn for count := 0; count < int(group.options.concurrency); count++ { - if count%int(connectionsSharedByWorker) == 0 { + if count%int(connectionsSharedByWorker) == 0 || connection == nil { connection, _ = group.newConnection() // TODO: Handle error if group.responseReader != nil && connection != nil {