From d6889a27b50342a8695366c12ccbdcfcb98da3c6 Mon Sep 17 00:00:00 2001 From: headlessdev Date: Thu, 17 Apr 2025 14:41:50 +0200 Subject: [PATCH] Fix: Update online status check to account for HTTP 405 response --- agent/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/main.go b/agent/main.go index f60e07b..419e8a3 100644 --- a/agent/main.go +++ b/agent/main.go @@ -131,7 +131,7 @@ func checkAndUpdateStatus(db *sql.DB, client *http.Client, apps []Application) { resp.Body.Close() // Important to prevent leaks } - isOnline := err == nil && resp != nil && resp.StatusCode >= 200 && resp.StatusCode < 300 + isOnline := err == nil && resp != nil && resp.StatusCode >= 200 && resp.StatusCode < 300 || resp.StatusCode == 405 // Database Update dbCtx, dbCancel := context.WithTimeout(context.Background(), 5*time.Second)