From 0847f604dbb7da87c541464be9ac3b2322115d98 Mon Sep 17 00:00:00 2001 From: Feng_Qi Date: Thu, 8 Sep 2016 16:49:28 +0800 Subject: [PATCH] fix pannic bug --- funcs/swifstat.go | 2 +- g/const.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/funcs/swifstat.go b/funcs/swifstat.go index efc4335..fa71169 100644 --- a/funcs/swifstat.go +++ b/funcs/swifstat.go @@ -331,8 +331,8 @@ func swIfMetrics() (L []*model.MetricValue) { } } } + lastIfStat[chIfStat.Ip] = chIfStat.IfStatsList } - lastIfStat[chIfStat.Ip] = chIfStat.IfStatsList } endTime := time.Now() diff --git a/g/const.go b/g/const.go index 31f8b15..e976694 100644 --- a/g/const.go +++ b/g/const.go @@ -14,8 +14,9 @@ import ( // 3.2.1.1 debugmetric support multi endpoints and metrics // 3.2.1.2 gosnmp use getnext to walk snmp // 4.0.0 caculate counter type on swcollect local,add speedpercent +// 4.0.1 fix sometimes ifstat pannic const ( - VERSION = "4.0.0" + VERSION = "4.0.1" COLLECT_INTERVAL = time.Second )