Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
fix(io): make resetPosition actually reset everything
Browse files Browse the repository at this point in the history
Including the offset.
  • Loading branch information
Stebalien committed Jan 6, 2020
1 parent 47e4181 commit d1f8577
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions io/dagreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ func (dr *dagReader) Seek(offset int64, whence int) (int64, error) {
// in the `SeekStart` case.
func (dr *dagReader) resetPosition() {
dr.currentNodeData = nil
dr.offset = 0

dr.dagWalker = ipld.NewWalker(dr.ctx, ipld.NewNavigableIPLDNode(dr.rootNode, dr.serv))
// TODO: This could be avoided (along with storing the `dr.rootNode` and
Expand Down

0 comments on commit d1f8577

Please sign in to comment.