possible fix for rare panic
This commit is contained in:
parent
f0af1fb04d
commit
88861102fd
4 changed files with 20 additions and 17 deletions
|
|
@ -163,7 +163,7 @@ func (f *file) ReadAt(p []byte, pos int64) (n int, err error) {
|
|||
defer f.rmu.Unlock()
|
||||
cn, _, roff := align(pos)
|
||||
var last bool
|
||||
if f.r.cn != cn {
|
||||
if f.r.cn != cn || roff >= int64(len(f.r.unread)) {
|
||||
_, err = f.Seek(pos, io.SeekStart)
|
||||
if err != nil {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue