修复TOA管理中可能出现的panic错误

This commit is contained in:
GoEdgeLab
2021-11-29 11:15:14 +08:00
parent 03ea77eee1
commit 5eef932d10

View File

@@ -42,7 +42,9 @@ func (this *TOAManager) Run(config *nodeconfigs.TOAConfig) error {
if err != nil {
remotelogs.Error("TOA", "quit error: "+err.Error())
}
_ = this.conn.Close()
if this.conn != nil {
_ = this.conn.Close()
}
this.conn = nil
this.pid = 0
}