Skip to content

Commit

Permalink
fix: invert client check when closing connections
Browse files Browse the repository at this point in the history
  • Loading branch information
benfiola committed Nov 20, 2024
1 parent f77cb64 commit 9fe2e12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/provider/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (c *client) maybeCloseClient() error {
defer c.mutex.Unlock()
c.mutex.Lock()
c.connections -= 1
if c.connections == 0 && c.client == nil {
if c.connections == 0 && c.client != nil {
err := c.client.Close()
c.client = nil
if err != nil {
Expand Down

0 comments on commit 9fe2e12

Please sign in to comment.