2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 03:07:20 +08:00

fix: PHP关闭状态下获取负载报错

This commit is contained in:
耗子
2024-10-27 04:37:38 +08:00
parent 513a298541
commit 2a61f8939f

View File

@@ -87,7 +87,7 @@ func (s *Service) Load(w http.ResponseWriter, r *http.Request) {
client := resty.New().SetTimeout(10 * time.Second)
resp, err := client.R().Get(fmt.Sprintf("http://127.0.0.1/phpfpm_status/%d", s.version))
if err != nil || !resp.IsSuccess() {
service.Error(w, http.StatusInternalServerError, "获取负载状态失败:%v", err)
service.Success(w, []types.NV{})
return
}