mirror of
https://github.com/openziti/zrok.git
synced 2025-08-16 19:01:16 +02:00
limits.Agent.enforce needs to consider the store.Account.Limitless flag
This commit is contained in:
@ -239,6 +239,14 @@ func (a *Agent) enforce(u *metrics.Usage) error {
|
||||
}
|
||||
defer func() { _ = trx.Rollback() }()
|
||||
|
||||
acct, err := a.str.GetAccount(int(u.AccountId), trx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if acct.Limitless {
|
||||
return nil
|
||||
}
|
||||
|
||||
if enforce, warning, rxBytes, txBytes, err := a.checkAccountLimit(u.AccountId); err == nil {
|
||||
if enforce {
|
||||
enforced := false
|
||||
|
Reference in New Issue
Block a user