Skip to content

Commit 2107ccb

Browse files
authored
fix: reset instance status to 'stopped' for non-API Key instances during state load
1 parent 06beeba commit 2107ccb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/master.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,11 @@ func (m *Master) loadState() {
775775
for id, instance := range persistentData {
776776
instance.stopped = make(chan struct{})
777777

778+
// 重置实例状态
779+
if instance.ID != apiKeyID {
780+
instance.Status = "stopped"
781+
}
782+
778783
// 生成完整配置
779784
if instance.Config == "" && instance.ID != apiKeyID {
780785
instance.Config = m.generateConfigURL(instance)

0 commit comments

Comments
 (0)