Fix missing loop (#1398)
* WithRoles variadic args * Load Rules * Timer => Ticker * Add missing for loop in auth service Co-authored-by: Ben Toogood <ben@micro.mu>
This commit is contained in:
parent
fd664f4392
commit
84b4eb5404
@ -54,8 +54,10 @@ func (s *svc) Init(opts ...auth.Option) {
|
||||
// load rules periodically from the auth service
|
||||
timer := time.NewTicker(time.Second * 30)
|
||||
go func() {
|
||||
for {
|
||||
s.loadRules()
|
||||
<-timer.C
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user