nsqio / go-diskqueue

A Go package providing a filesystem-backed FIFO queue
MIT License
464 stars 103 forks source link

maxBytesPerFile read check off-by-one #14

Closed xkeyideal closed 4 years ago

xkeyideal commented 4 years ago

https://github.com/nsqio/go-diskqueue/blob/master/diskqueue.go#L332

should change it if d.nextReadPos >= d.maxBytesPerFile {

ploxiln commented 4 years ago

This looks like a very similar situation to what #8 fixed. Would you like to open a pull request?

ploxiln commented 4 years ago

(I think this particular check is not as important, because the end-of-file is handled elsewhere.)

ploxiln commented 4 years ago

closing in favor of #15