Skip to content

Commit

Permalink
Removed useless mutex locks
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Sep 13, 2024
1 parent c563e77 commit 36c5780
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ func (disc *Client) Run() (err error) {
} else if msg.ProtocolVersion > 1 {
return fmt.Errorf("protocol version not supported: requested 1, got %d", msg.ProtocolVersion)
}
disc.statusMutex.Lock()
defer disc.statusMutex.Unlock()
return nil
}

Expand All @@ -307,8 +305,6 @@ func (disc *Client) Start() error {
} else if strings.ToUpper(msg.Message) != "OK" {
return fmt.Errorf("communication out of sync, expected 'OK', received '%s'", msg.Message)
}
disc.statusMutex.Lock()
defer disc.statusMutex.Unlock()
return nil
}

Expand Down

0 comments on commit 36c5780

Please sign in to comment.