Skip to content

Commit

Permalink
universe: update pushProofToFederation to make sure all servers are t…
Browse files Browse the repository at this point in the history
…ried

In this commit, we fix a bug that would cause universe proof push to
fail for all servers, if anyone of them was unreachable, or rejected the
proof.

If we return `err` here, then eventually the context will be read by
other goroutines, which is already cancelled at this point. This'll
cause the push attempt to stop short.

We now long and return `nil` so the other goroutines will continue.

See #527 for more
details.
  • Loading branch information
Roasbeef committed Sep 21, 2023
1 parent a201d48 commit da192f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions universe/auto_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,10 @@ func (f *FederationEnvoy) pushProofToFederation(uniID Identifier, key BaseKey,
pushNewProof := func(ctx context.Context, addr ServerAddr) error {
remoteUniverseServer, err := f.cfg.NewRemoteRegistrar(addr)
if err != nil {
return fmt.Errorf("unable to connect to remote "+
"server(%v): %v", addr.HostStr(), err)
log.Warnf("cannot push proof unable to connect "+
"to remote server(%v): %v", addr.HostStr(),
err)
return nil
}

_, err = remoteUniverseServer.RegisterIssuance(
Expand Down

0 comments on commit da192f6

Please sign in to comment.