Explorar o código

set peer endpoint if host endpoint is nil

abhishek9686 hai 10 meses
pai
achega
e58f2f9d49
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      logic/peers.go

+ 1 - 1
logic/peers.go

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