fix gateway reload will cause pico stop working issue (#2082)

* fix gateway reload will cause pico stop working issue

* fix for review
This commit is contained in:
Cytown
2026-03-28 11:30:31 +08:00
committed by GitHub
parent 60d7ec20a5
commit f1cb7cc8f5
8 changed files with 336 additions and 43 deletions
+1 -1
View File
@@ -730,8 +730,8 @@ func (h *Handler) gatewayStatusData() map[string]any {
gateway.mu.Unlock()
logger.ErrorC("gateway", fmt.Sprintf("Gateway health check failed: %v", err))
} else {
logger.InfoC("gateway", fmt.Sprintf("Gateway health status: %d", statusCode))
if statusCode != http.StatusOK {
logger.WarnC("gateway", fmt.Sprintf("Gateway health status: %d", statusCode))
gateway.mu.Lock()
setGatewayRuntimeStatusLocked("error")
gateway.mu.Unlock()