mirror of
https://github.com/zix99/traefik-lazyload.git
synced 2025-12-21 21:33:09 +01:00
Add cancel defer
This commit is contained in:
@@ -138,7 +138,8 @@ func (s *Core) Poll() {
|
|||||||
s.mux.Lock()
|
s.mux.Lock()
|
||||||
defer s.mux.Unlock()
|
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.checkForNewContainers(ctx)
|
||||||
s.watchForInactivity(ctx)
|
s.watchForInactivity(ctx)
|
||||||
|
|||||||
Reference in New Issue
Block a user