mirror of
https://github.com/openziti/zrok.git
synced 2024-12-22 23:02:52 +01:00
limits.Agent.enforce needs to consider the store.Account.Limitless flag
This commit is contained in:
parent
04fddce422
commit
edef86d06a
@ -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
|
||||
|
@ -451,4 +451,4 @@ You use the `zrok reserve` command to create _reserved shares_. Reserved shares
|
||||
Interested in self-hosting your own `zrok` service instance? See the [self-hosting guide](./guides/self-hosting/self_hosting_guide.md) for details.
|
||||
|
||||
[openziti]: https://docs.openziti.io/docs/learn/introduction/ "OpenZiti"
|
||||
[ zrok-download]: https://zrok.io "Zrok Download"
|
||||
[ zrok-download]: https://zrok.io "zrok Download"
|
Loading…
Reference in New Issue
Block a user