mirror of
https://github.com/XrayR-project/XrayR.git
synced 2025-06-08 13:29:54 +00:00
fix: init global limit
This commit is contained in:
parent
b47954ea64
commit
a397af5d73
@ -144,7 +144,7 @@ func (l *Limiter) GetUserBucket(tag string, email string, ip string) (limiter *r
|
||||
nodeLimit := inboundInfo.NodeSpeedLimit
|
||||
var (
|
||||
userLimit uint64 = 0
|
||||
deviceLimit, uid, globalDeviceLimit int
|
||||
deviceLimit, uid int
|
||||
)
|
||||
|
||||
if v, ok := inboundInfo.UserInfo.Load(email); ok {
|
||||
@ -155,7 +155,7 @@ func (l *Limiter) GetUserBucket(tag string, email string, ip string) (limiter *r
|
||||
}
|
||||
|
||||
// Global device limit
|
||||
if globalDeviceLimit > 0 {
|
||||
if l.g.limit > 0 {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
|
||||
defer cancel()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user