fix some bugs

This commit is contained in:
yuzuki999
2023-06-09 12:36:49 +08:00
parent 42bb7bc90f
commit 9827d442d5
14 changed files with 103 additions and 80 deletions

View File

@@ -1,7 +1,6 @@
package hy
import (
"github.com/apernet/hysteria/core/cs"
"sync"
"sync/atomic"
)
@@ -17,8 +16,10 @@ type counters struct {
//ConnGauge atomic.Int64
}
func NewUserTrafficCounter() cs.TrafficCounter {
return new(UserTrafficCounter)
func NewUserTrafficCounter() *UserTrafficCounter {
return &UserTrafficCounter{
counters: map[string]*counters{},
}
}
func (c *UserTrafficCounter) getCounters(auth string) *counters {