Skip to content

Commit

Permalink
Sarthak | WorkerGroup now establishes a new connection even if the ex…
Browse files Browse the repository at this point in the history
…isting connection is nil
  • Loading branch information
SarthakMakhija committed Aug 18, 2023
1 parent 53a2a47 commit fb76ae5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workers/worker_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fb76ae5

Please sign in to comment.