From 553d82370d71a3d6562781e906255aa3b45da022 Mon Sep 17 00:00:00 2001 From: lxh2875931338 Date: Tue, 11 Aug 2026 21:47:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=AF=E5=8A=A8=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E9=80=BB=E8=BE=91=EF=BC=8Clog=E6=8A=93=E5=87=BA?= =?UTF-8?q?=E6=9D=A5=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/process/manager.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/process/manager.go b/internal/process/manager.go index d86ca2c..fb64750 100644 --- a/internal/process/manager.go +++ b/internal/process/manager.go @@ -858,9 +858,10 @@ func (pm *ProcessManager) computeState(pid int, result PortCheckResult) ProcessS return state } - // 3. 启动超时 - if time.Since(pm.startTime) > StartupTimeout && pm.currentPhase != PhaseReloading { - log.Printf("[DEBUG] computeState: 启动超时, startTime=%v, elapsed=%v", pm.startTime, time.Since(pm.startTime)) + // 3. 启动超时(只对 STARTING 状态生效) + if pm.currentPhase == PhaseStarting && time.Since(pm.startTime) > StartupTimeout { + log.Printf("[DEBUG] computeState: 启动超时, startTime=%v, elapsed=%v", + pm.startTime, time.Since(pm.startTime)) state.Error = fmt.Sprintf("启动超时 (超过 %v)", StartupTimeout) if portErr != nil { state.Error += ": " + portErr.Error()