Skip to content

Commit cbbceb5

Browse files
committed
Combine back-to-back mutex lock/unlock in connectOnce
1 parent 9ad243f commit cbbceb5

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

backend/cluster/client.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,6 @@ func (c *Client) connectOnce(ctx context.Context) error {
294294
c.statusMutex.Lock()
295295
c.isConnected = false
296296
c.readLoopStarted = false
297-
c.statusMutex.Unlock()
298-
c.statusMutex.Lock()
299297
if c.conn != nil {
300298
_ = c.conn.Close() // Ensure underlying connection is closed
301299
c.conn = nil

0 commit comments

Comments
 (0)