mirror of
https://github.com/XrayR-project/XrayR.git
synced 2025-06-08 21:39:55 +00:00
Add default value for AutoSpeedLimitConfig
This commit is contained in:
parent
39c1036c4a
commit
a9dfd5404f
@ -109,6 +109,9 @@ func (c *Controller) Start() error {
|
||||
Interval: time.Duration(c.config.UpdatePeriodic) * time.Second,
|
||||
Execute: c.userInfoMonitor,
|
||||
}
|
||||
if c.config.AutoSpeedLimitConfig == nil {
|
||||
c.config.AutoSpeedLimitConfig = &AutoSpeedLimitConfig{0, 0, 0, 0}
|
||||
}
|
||||
if c.config.AutoSpeedLimitConfig.Limit > 0 {
|
||||
c.limitedUsers = make(map[api.UserInfo]LimitInfo)
|
||||
c.warnedUsers = make(map[api.UserInfo]int)
|
||||
|
Loading…
x
Reference in New Issue
Block a user