diff --git a/main.go b/main.go index ea244d5..8c0eb0b 100644 --- a/main.go +++ b/main.go @@ -61,6 +61,11 @@ func main() { } template.InitTemplatingEngine(config.GlobalServerConfig.InDevelopment) + // Initialize and start the proxy checker + ctx_timeout, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + config.InitializeProxyChecker(ctx_timeout) + router := defineRoutes() main_handler := func(w_ http.ResponseWriter, r *http.Request) { @@ -118,11 +123,6 @@ func main() { } } - // Initialize and start the proxy checker - ctx_timeout, cancel := context.WithTimeout(context.Background(), 10*time.Second) - defer cancel() - config.InitializeProxyChecker(ctx_timeout) - // run sass when in development mode if config.GlobalServerConfig.InDevelopment { go func() {