v1.5.1 增强程序稳定性
This commit is contained in:
@@ -20,6 +20,12 @@ func init() {
|
||||
// 定期上传日志
|
||||
var ticker = time.NewTicker(60 * time.Second)
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
logs.Println("[LOG]goroutine panic:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
for range ticker.C {
|
||||
err := uploadLogs()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user