Skip to content

Commit

Permalink
ExtendPeerList instead of Replace when querying SRVs
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Warehime committed Jul 31, 2023
1 parent d82691d commit afacc28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions network/wsNetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -1775,12 +1775,12 @@ func (wn *WebsocketNetwork) refreshRelayArchivePhonebookAddresses() {
func (wn *WebsocketNetwork) updatePhonebookAddresses(relayAddrs []string, archiveAddrs []string) {
if len(relayAddrs) > 0 {
wn.log.Debugf("got %d relay dns addrs, %#v", len(relayAddrs), relayAddrs[:imin(5, len(relayAddrs))])
wn.phonebook.ReplacePeerList(relayAddrs, string(wn.NetworkID), PhoneBookEntryRelayRole)
wn.phonebook.ExtendPeerList(relayAddrs, string(wn.NetworkID), PhoneBookEntryRelayRole)
} else {
wn.log.Infof("got no relay DNS addrs for network %s", wn.NetworkID)
}
if len(archiveAddrs) > 0 {
wn.phonebook.ReplacePeerList(archiveAddrs, string(wn.NetworkID), PhoneBookEntryArchiverRole)
wn.phonebook.ExtendPeerList(archiveAddrs, string(wn.NetworkID), PhoneBookEntryArchiverRole)
}
}

Expand Down

0 comments on commit afacc28

Please sign in to comment.