diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-07-10 14:39:34 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-07-17 14:00:03 +0000 |
| commit | a1879195a727d7b90347ed11f86d85fac6541df7 (patch) | |
| tree | ef19423671009552181f759b4a9162e7d91bf82a /internal/server | |
| parent | 7f8af5845ddec1816f93a2cb013f0818c19caab3 (diff) | |
Client + Discovery: Fetch dscovery at startup using DiscoveryStartup
With a manager that locks and copies such that no race conditions happen
Diffstat (limited to 'internal/server')
| -rw-r--r-- | internal/server/secureinternet.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/server/secureinternet.go b/internal/server/secureinternet.go index f167756..990ceb3 100644 --- a/internal/server/secureinternet.go +++ b/internal/server/secureinternet.go @@ -34,8 +34,10 @@ func (s *Servers) AddSecure(ctx context.Context, disco *discovery.Discovery, org BaseWK: dsrv.BaseURL, BaseAuthWK: dsrv.BaseURL, ProcessAuth: func(ctx context.Context, url string) (string, error) { - disco.Servers(ctx) - disco.Organizations(ctx) + // the only thing we can do is log warn + // this is already done in the functions + disco.Servers(ctx) //nolint:errcheck + disco.Organizations(ctx) //nolint:errcheck updorg, updsrv, err := disco.SecureHomeArgs(orgID) if err != nil { return "", err @@ -104,10 +106,12 @@ func (s *Servers) GetSecure(ctx context.Context, orgID string, disco *discovery. BaseWK: dloc.BaseURL, BaseAuthWK: dhome.BaseURL, ProcessAuth: func(ctx context.Context, url string) (string, error) { + // the only thing we can do is log warn + // this is already done in the functions disco.MarkServersExpired() - disco.Servers(ctx) + disco.Servers(ctx) //nolint:errcheck disco.MarkOrganizationsExpired() - disco.Organizations(ctx) + disco.Organizations(ctx) //nolint:errcheck updorg, updsrv, err := disco.SecureHomeArgs(orgID) if err != nil { return "", err |
