Skip to content

Commit 36c5780

Browse files
committed
Removed useless mutex locks
1 parent c563e77 commit 36c5780

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Diff for: client.go

-4
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,6 @@ func (disc *Client) Run() (err error) {
287287
} else if msg.ProtocolVersion > 1 {
288288
return fmt.Errorf("protocol version not supported: requested 1, got %d", msg.ProtocolVersion)
289289
}
290-
disc.statusMutex.Lock()
291-
defer disc.statusMutex.Unlock()
292290
return nil
293291
}
294292

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

0 commit comments

Comments
 (0)