If a relay has multiple names, print the one matching the protocol

Fixes #1992
This commit is contained in:
Frank Denis 2022-01-17 19:43:12 +01:00
parent 4fd26029c7
commit 06733f57ed
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ func route(proxy *Proxy, name string, serverProto stamps.StampProtoType) (*Relay
relayName := relayCandidateStamp.ServerAddrStr
proxy.serversInfo.RLock()
for _, registeredServer := range proxy.serversInfo.registeredRelays {
if registeredServer.stamp.ServerAddrStr == relayCandidateStamp.ServerAddrStr {
if registeredServer.stamp.Proto == relayProto && registeredServer.stamp.ServerAddrStr == relayCandidateStamp.ServerAddrStr {
relayName = registeredServer.name
break
}