Fix TSM1 panic on reader error.

This commit fixes an error check so that a `nil` TSM reader does
not cause a panic.
pull/10299/head
Ben Johnson 2018-09-24 08:54:28 -06:00
parent 8d679cf0c3
commit da2dfa495e
No known key found for this signature in database
GPG Key ID: 81741CD251883081
1 changed files with 2 additions and 0 deletions

View File

@ -547,6 +547,8 @@ func (f *FileStore) Open() error {
readerC <- &res{r: df, err: fmt.Errorf("cannot rename corrupt file %s: %v", file.Name(), e)}
return
}
readerC <- &res{r: df, err: fmt.Errorf("cannot read corrupt file %s: %v", file.Name(), err)}
return
}
df.WithObserver(f.obs)