Skip to content

Commit 5653367

Browse files
committed
stop ticker when goroutine exits
Signed-off-by: Tim Ramlot <[email protected]>
1 parent 5aa829e commit 5653367

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

manager/manager.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ func (m *Manager) startRenewalRoutine(volumeID string) (started bool) {
811811
go func() {
812812
// check every volume once per second
813813
ticker := time.NewTicker(time.Second)
814+
defer ticker.Stop()
814815
for {
815816
select {
816817
case <-stopCh:

0 commit comments

Comments
 (0)