Skip to content

Commit

Permalink
fix: Fix the issue of node port switching
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu committed Dec 26, 2024
1 parent 383c2a9 commit 10d8c6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion agent/app/service/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ func (u *SettingService) ReloadConn() error {
return nil
}
if len(global.CONF.System.Port) != 0 && global.CONF.System.Port != fmt.Sprintf("%v", nodeInfo.NodePort) {
_, _ = cmd.Exec("systemctl restart 1panel-agent.service")
go func() {
time.Sleep(1 * time.Second)
_, _ = cmd.Exec("systemctl restart 1panel-agent.service")
}()
return nil
}

Expand Down

0 comments on commit 10d8c6c

Please sign in to comment.