优化代码

This commit is contained in:
刘祥超
2022-08-07 11:12:29 +08:00
parent 4096f11909
commit 10665c0f37
7 changed files with 87 additions and 126 deletions

View File

@@ -106,7 +106,7 @@ func (this *TrafficStatManager) Add(serverId int64, domain string, bytes int64,
this.totalRequests++
var timestamp = utils.FloorUnixTime(300)
key := strconv.FormatInt(timestamp, 10) + strconv.FormatInt(serverId, 10)
var key = strconv.FormatInt(timestamp, 10) + strconv.FormatInt(serverId, 10)
this.locker.Lock()
// 总的流量