Skip to content

Commit

Permalink
defer lock
Browse files Browse the repository at this point in the history
  • Loading branch information
mh0lt committed Jun 8, 2024
1 parent 3d5abe1 commit 870f3fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion peerconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ func (c *PeerConn) mainReadLoop() (err error) {
case pp.Extended:
func() {
cl.unlock()
cl.lock()
defer cl.lock()
err = c.onReadExtendedMsg(msg.ExtendedID, msg.ExtendedPayload)
}()
default:
Expand Down

0 comments on commit 870f3fd

Please sign in to comment.