From 6ab1b5562cd5f7cca55b71fa7733b8d1a199599b Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Fri, 13 Sep 2024 22:07:58 +0200 Subject: [PATCH] fix: increase timeout for health check, call website (#664) --- application/server/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/server/server.go b/application/server/server.go index cdbf6015e..5a97a19fd 100644 --- a/application/server/server.go +++ b/application/server/server.go @@ -440,9 +440,9 @@ func initializedHandler(srv *jrpc2.Server) handler.Func { func startOfflineDetection(c *config.Config) { go func() { - timeout := time.Second * 2 + timeout := time.Second * 10 client := c.Engine().GetNetworkAccess().GetUnauthorizedHttpClient() - client.Timeout = timeout + client.Timeout = timeout - 1 type logLevelConfigurable interface { SetLogLevel(level zerolog.Level) @@ -453,7 +453,7 @@ func startOfflineDetection(c *config.Config) { } for { - u := c.SnykApi() + u := c.SnykUi() response, err := client.Get(u) if err != nil { if !c.Offline() {