优化代码

This commit is contained in:
GoEdgeLab
2022-01-11 09:25:34 +08:00
parent fc4e02c82d
commit f8299b2447
4 changed files with 26 additions and 3 deletions

View File

@@ -100,8 +100,7 @@ func (this *TrafficStatManager) Add(serverId int64, domain string, bytes int64,
this.totalRequests++
timestamp := utils.UnixTime() / 300 * 300
timestamp := utils.FloorUnixTime(300)
key := strconv.FormatInt(timestamp, 10) + strconv.FormatInt(serverId, 10)
this.locker.Lock()