Skip to content

Commit

Permalink
fix: check for nil round tripper when detecting bootstrap status from…
Browse files Browse the repository at this point in the history
… local storage
  • Loading branch information
tinyzimmer committed Nov 5, 2023
1 parent 5dba873 commit c1117ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/meshnode/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ func (s *meshStore) bootstrap(ctx context.Context, opts ConnectOptions) error {
if bootstrapped {
// We have data, so the cluster is already bootstrapped.
s.log.Info("Cluster already bootstrapped, attempting to rejoin as voter")
if opts.JoinRoundTripper == nil {
s.log.Info("Cluster already bootstrapped, but we have no join transport. Recovering from storage.")
return s.recoverWireguard(ctx)
}
return s.join(ctx, opts)
}
s.log.Debug("Cluster not yet bootstrapped, attempting to bootstrap")
Expand Down

0 comments on commit c1117ce

Please sign in to comment.