Skip to content

Commit

Permalink
store/tikv: unify to use close function when get data with error. (#1186
Browse files Browse the repository at this point in the history
)
  • Loading branch information
qiuyesuifeng authored and shenli committed May 3, 2016
1 parent f673bc3 commit 44f9cdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion store/tikv/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (s *Scanner) Next() error {
ret, err := s.getData()
if err != nil {
log.Errorf("getData failed: %s", err)
s.valid = false
s.Close()
return errors.Trace(err)
}
s.cache = ret
Expand Down

0 comments on commit 44f9cdb

Please sign in to comment.