Browse Source

set peer endpoint if host endpoint is nil

abhishek9686 10 months ago
parent
commit
92c47b9156
1 changed files with 1 additions and 1 deletions
  1. 1 1
      logic/peers.go

+ 1 - 1
logic/peers.go

@@ -231,7 +231,7 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N
 					peerEndpoint = peerHost.EndpointIP
 				}
 			}
-			if host.EndpointIP == nil && peerEndpoint == nil {
+			if host.EndpointIPv6 == nil && peerEndpoint == nil {
 				if peerHost.EndpointIPv6 != nil {
 					peerEndpoint = peerHost.EndpointIPv6
 				}