Skip to content

Commit d4a800e

Browse files
authored
[client] Fix status recorder panic (#3988)
1 parent dd9917f commit d4a800e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

client/internal/peer/status.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,13 +575,12 @@ func (d *Status) UpdatePeerFQDN(peerPubKey, fqdn string) error {
575575
// FinishPeerListModifications this event invoke the notification
576576
func (d *Status) FinishPeerListModifications() {
577577
d.mux.Lock()
578+
defer d.mux.Unlock()
578579

579580
if !d.peerListChangedForNotification {
580-
d.mux.Unlock()
581581
return
582582
}
583583
d.peerListChangedForNotification = false
584-
d.mux.Unlock()
585584

586585
d.notifyPeerListChanged()
587586

0 commit comments

Comments
 (0)