Don't close nil channel

Obviously a TSDB store may be closed before it's opened.
pull/4035/head
Philip O'Toole 2015-09-08 10:49:45 -07:00
parent 2824a9c92a
commit 255fb3364d
1 changed files with 3 additions and 1 deletions

View File

@ -361,7 +361,9 @@ func (s *Store) Close() error {
return err
}
}
close(s.closing)
if s.closing != nil {
close(s.closing)
}
s.closing = nil
s.shards = nil
s.databaseIndexes = nil