From f910da0f8aceb681066d53087a915c334fd20b92 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 20 Dec 2021 21:47:32 +0100 Subject: [PATCH] outposts: fix initial refresh not calling Server.Refresh() Signed-off-by: Jens Langhammer --- internal/outpost/ak/api.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/outpost/ak/api.go b/internal/outpost/ak/api.go index dbe237a02..15c00e899 100644 --- a/internal/outpost/ak/api.go +++ b/internal/outpost/ak/api.go @@ -106,7 +106,11 @@ func NewAPIController(akURL url.URL, token string) *APIController { // Start Starts all handlers, non-blocking func (a *APIController) Start() error { - err := a.StartBackgorundTasks() + err := a.Server.Refresh() + if err != nil { + return err + } + err = a.StartBackgorundTasks() if err != nil { return err }