Merge pull request #78 from tim-beatham/bugfix-node-not-leving

main
This commit is contained in:
Tim Beatham 2024-01-02 20:12:10 +00:00 committed by GitHub
commit 4d19da6727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

BIN
api Executable file

Binary file not shown.

View File

@ -104,14 +104,14 @@ func (s *SyncerImpl) Sync(correspondingMesh mesh.MeshProvider) error {
// Do this synchronously to conserve bandwidth
for _, node := range gossipNodes {
correspondingPeer := s.manager.GetNode(correspondingMesh.GetMeshId(), node)
correspondingPeer, err := correspondingMesh.GetNode(node)
if correspondingPeer == nil {
if correspondingPeer == nil || err == nil {
logging.Log.WriteErrorf("node %s does not exist", node)
continue
}
err := s.requester.SyncMesh(correspondingMesh.GetMeshId(), correspondingPeer)
err = s.requester.SyncMesh(correspondingMesh.GetMeshId(), correspondingPeer)
if err == nil || err == io.EOF {
succeeded = true