优化启动超时逻辑,log抓出来了
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user