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
|
// load rules periodically from the auth service
|
||||||
timer := time.NewTicker(time.Second * 30)
|
timer := time.NewTicker(time.Second * 30)
|
||||||
go func() {
|
go func() {
|
||||||
|
for {
|
||||||
s.loadRules()
|
s.loadRules()
|
||||||
<-timer.C
|
<-timer.C
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user