diff --git a/pkg/service/service.go b/pkg/service/service.go index 8ae831f..bcb633f 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -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)