Skip to content

Commit

Permalink
feat: fix bug in isClosed function where we locked twice 🤦
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <manan@planetscale.com>
  • Loading branch information
GuptaManan100 committed Feb 17, 2025
1 parent a8d2cbd commit da4a8f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletmanager/semisyncmonitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (m *Monitor) isSemiSyncBlocked(ctx context.Context) (bool, error) {
// isClosed returns if the monitor is currently closed or not.
func (m *Monitor) isClosed() bool {
m.mu.Lock()
defer m.mu.Lock()
defer m.mu.Unlock()
return !m.isOpen
}

Expand Down

0 comments on commit da4a8f8

Please sign in to comment.