Commit 5217fa9b authored by szh's avatar szh

autossh 定期清理链接

parent 16334ca3
......@@ -569,7 +569,6 @@ func AutoSSHClean() error {
pai,err := getPaiProcessInfo()
if err != nil {
tlog.Error("getPaiProcessInfo","err",err)
return err
}
tlog.Info("getPaiProcessInfo","pai",*pai)
......@@ -577,6 +576,7 @@ func AutoSSHClean() error {
if pai.Stime > 0 && (time.Now().Unix()-pai.Stime) > 72 * 3600 && pai.Pid > 0 {
err := KillAutoSsh(pai.Pid)
if err != nil {
tlog.Error("KillAutoSsh","err",err)
return err
}
tlog.Info("KillAutoSsh Success","pid",pai.Pid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment