Skip to content

Commit

Permalink
Avoid duplicate multicast peerings by having the higher key dial the …
Browse files Browse the repository at this point in the history
…lower one only
  • Loading branch information
neilalexander committed Jul 20, 2024
1 parent 04c0acf commit dc95131
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/multicast/multicast.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func (m *Multicast) listen() {
continue
case adv.MinorVersion != core.ProtocolVersionMinor:
continue
case adv.PublicKey.Equal(m.core.PublicKey()):
case bytes.Compare(adv.PublicKey, m.core.PublicKey()) >= 0:
continue
}
from := fromAddr.(*net.UDPAddr)
Expand Down

0 comments on commit dc95131

Please sign in to comment.