diff --git a/api/internal/snapshot/snapshot.go b/api/internal/snapshot/snapshot.go index da9565cce..2c2e5ef34 100644 --- a/api/internal/snapshot/snapshot.go +++ b/api/internal/snapshot/snapshot.go @@ -4,7 +4,7 @@ import ( "log" "time" - "github.com/portainer/portainer/api" + portainer "github.com/portainer/portainer/api" ) // Service repesents a service to manage endpoint snapshots. @@ -48,7 +48,9 @@ func (service *Service) stop() { return } + // clear refreshSignal to mark the service as disabled close(service.refreshSignal) + service.refreshSignal = nil } // SetSnapshotInterval sets the snapshot interval and resets the service