storage/boltdb.go | 15 ++++++++------- diff --git a/storage/boltdb.go b/storage/boltdb.go index 4a6928a52afdfd743e1dd8490415154f765dee47..a198f4888a332c8c964f694c5c848cc9795591de 100644 --- a/storage/boltdb.go +++ b/storage/boltdb.go @@ -2,6 +2,7 @@ package storage import ( "encoding/binary" + "io" "path/filepath" "github.com/boltdb/bolt" @@ -100,13 +101,13 @@ n += n1 } return nil }) - // if n == 0 && err == nil { - // if off < me.p.Length() { - // err = io.ErrUnexpectedEOF - // } else { - // err = io.EOF - // } - // } + if n == 0 && err == nil { + if off < me.p.Length() { + err = io.ErrUnexpectedEOF + } else { + err = io.EOF + } + } // // log.Println(n, err) return }