[client] Fix status recorder panic (#3988)

This commit is contained in:
Viktor Liu
2025-06-17 01:20:26 +02:00
committed by GitHub
parent dd9917f1a8
commit d4a800edd5

View File

@@ -575,13 +575,12 @@ func (d *Status) UpdatePeerFQDN(peerPubKey, fqdn string) error {
// FinishPeerListModifications this event invoke the notification
func (d *Status) FinishPeerListModifications() {
d.mux.Lock()
defer d.mux.Unlock()
if !d.peerListChangedForNotification {
d.mux.Unlock()
return
}
d.peerListChangedForNotification = false
d.mux.Unlock()
d.notifyPeerListChanged()