rpl fix panic bug

This commit is contained in:
siddontang 2014-11-15 20:59:40 +08:00
parent 5196e211cc
commit c737ec82ff
1 changed files with 3 additions and 1 deletions

View File

@ -187,7 +187,7 @@ func (s *FileStore) StoreLog(l *Log) error {
return s.w.StoreLog(l)
}
func (s *FileStore) PuregeExpired(n int64) error {
func (s *FileStore) PurgeExpired(n int64) error {
s.rm.Lock()
purges := []*tableReader{}
@ -302,6 +302,8 @@ func (s *FileStore) load() error {
return err
}
s.rs = make(tableReaders, 0, len(fs))
var r *tableReader
var index int64
for _, f := range fs {