make sure the ticker is stopped

This commit is contained in:
Radu Ioan Fericean
2015-04-23 18:48:38 +03:00
parent b1ef36240f
commit 154552d0f6

View File

@@ -75,6 +75,7 @@ func (s *FileScribe) Record(rec Record, out *int) error {
t := time.NewTicker(s.savePeriod)
select {
case <-s.loopChecker:
t.Stop()
// cancel saving
case <-t.C:
if fileToSave != "" {