Skip to content

Commit

Permalink
Only call Stop on non-nil batchers
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Oct 14, 2015
1 parent 48ef04c commit d8789b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/opentsdb/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ func (s *Service) Close() error {
return s.ln.Close()
}

s.batcher.Stop()
if s.batcher != nil {
s.batcher.Stop()
}
close(s.done)
s.wg.Wait()
return nil
Expand Down

0 comments on commit d8789b6

Please sign in to comment.