diff --git a/controllers/hosts.go b/controllers/hosts.go index a587db4a0..6c6bbeccb 100644 --- a/controllers/hosts.go +++ b/controllers/hosts.go @@ -100,13 +100,13 @@ func pull(w http.ResponseWriter, r *http.Request) { } allNodes, err := logic.GetAllNodes() if err != nil { - logger.Log(0, "could not pull peers for host", hostID) + logger.Log(0, "failed to get nodes: ", hostID) logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal")) return } hPU, err := logic.GetPeerUpdateForHost("", host, allNodes, nil, nil) if err != nil { - logger.Log(0, "could not pull peers for host", hostID) + logger.Log(0, "could not pull peers for host", hostID, err.Error()) logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal")) return } diff --git a/logic/peers.go b/logic/peers.go index ada95ac91..aa3475765 100644 --- a/logic/peers.go +++ b/logic/peers.go @@ -118,7 +118,7 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N peerHost, err := GetHost(peer.HostID.String()) if err != nil { logger.Log(1, "no peer host", peer.HostID.String(), err.Error()) - return models.HostPeerUpdate{}, err + continue } peerConfig := wgtypes.PeerConfig{ PublicKey: peerHost.PublicKey,