mirror of
https://github.com/zix99/traefik-lazyload.git
synced 2025-12-21 13:23:04 +01:00
Add cancel defer
This commit is contained in:
@@ -138,7 +138,8 @@ func (s *Core) Poll() {
|
||||
s.mux.Lock()
|
||||
defer s.mux.Unlock()
|
||||
|
||||
ctx, _ := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer cancel()
|
||||
|
||||
s.checkForNewContainers(ctx)
|
||||
s.watchForInactivity(ctx)
|
||||
|
||||
Reference in New Issue
Block a user