Move the proxy checker up

This commit is contained in:
VnPower
2024-08-28 10:32:33 +07:00
parent 463d2e448d
commit ead778218c
+5 -5
View File
@@ -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() {