Skip to content

Commit

Permalink
fix(snapshot): update snapshot interval (portainer#4789)
Browse files Browse the repository at this point in the history
* fix(snapshot): update snapshot interval

* style(snapshot): add clarification about clearing signal
  • Loading branch information
chiptus authored Feb 19, 2021
1 parent 387bbec commit 4a1a46c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/internal/snapshot/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4a1a46c

Please sign in to comment.