mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-26 00:40:24 +08:00
从文件恢复带宽数据时跳过非今天的数据
This commit is contained in:
@@ -292,6 +292,9 @@ func (this *BandwidthStatManager) recover() {
|
||||
if err == nil && len(m) > 0 {
|
||||
var lastTime = ""
|
||||
for _, stat := range m {
|
||||
if stat.Day != utils.Ymd() {
|
||||
continue
|
||||
}
|
||||
if len(lastTime) == 0 || stat.TimeAt > lastTime {
|
||||
lastTime = stat.TimeAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user