From c98ad2e3291e2b2455d5b1eb79d38ec169bae38b Mon Sep 17 00:00:00 2001 From: lwch Date: Thu, 17 Aug 2023 15:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=9B=91=E6=8E=A7=E9=A2=91?= =?UTF-8?q?=E7=8E=87=E8=AE=BE=E7=BD=AE=E8=BF=87=E4=BD=8E=E6=97=B6CPU?= =?UTF-8?q?=E5=8D=A0=E7=94=A8=E7=8E=87=E8=BF=87=E9=AB=98=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app_report.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app_report.go b/app_report.go index 9b52e9c..d7c0926 100644 --- a/app_report.go +++ b/app_report.go @@ -8,9 +8,13 @@ import ( "time" "github.com/jkstack/anet" + "github.com/jkstack/jkframe/utils" ) func (app *app) report() { + if app.a.Configure().Monitor.Interval <= 0 { + app.a.Configure().Monitor.Interval = utils.Duration(5 * time.Second) + } for { time.Sleep(app.a.Configure().Monitor.Interval.Duration()) if !app.connected {