Skip to content

Commit

Permalink
wait group wraped by mutex
Browse files Browse the repository at this point in the history
Signed-off-by: Hiranmoy Das Chowdhury <[email protected]>
  • Loading branch information
HiranmoyChowdhury committed Jun 4, 2024
1 parent dbd3165 commit 2c6f950
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pgbouncer/kubedb_client_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ func GetXormClientList(kc client.Client, pb *api.PgBouncer, ctx context.Context,
if err != nil {
return clientlist, err
}
clientlist.Mutex.Lock()
clientlist.WG.Add(1)
clientlist.Mutex.Unlock()
go clientlist.addXormClient(kc, podName)
}

Expand Down

0 comments on commit 2c6f950

Please sign in to comment.