-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(client): wait for public reachability before registering (#4)
* try waiting for reachability changing * fix: reachability test only when it matters doing this in `Present` was too late, it was called in the middle of the ACME dance, and we want to avoid the entire ACME management and flow if we are not publicly reachable. this change delays management only if there is no certificate cached locally, and impacts only the very first cold start when p2p-forge registration needs to occur. entire ACME/p2p-forge flow can be delayed/disabled on nodes that are not (yet) publicly diallable by only calling `ManageAsync` in `func (m *P2PForgeCertMgr) Start() error` once we have connectivity checks passed. for now, we just listen for network.ReachabilityPublic, but this can be refined further in the future. * refactor: withHostConnectivity moved logic to reusable funcs and adjusted logger for better ux * log: clarify certmgr is paused in Private network --------- Co-authored-by: Marcin Rataj <lidel@lidel.org>
- Loading branch information
1 parent
d44723d
commit 17d209b
Showing
1 changed file
with
87 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters