优化代码

This commit is contained in:
GoEdgeLab
2022-08-07 11:12:29 +08:00
parent ca339a090c
commit 37486eba8c
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()
// 总的流量