Closed Mrmaxmeier closed 4 years ago
Doh, I thought I had fixed this annoying bug.
For the moment, I prefer not to change: refill
having nothing to read is not an error (arguably, it is also not an error in next
...) as long as you do not attempt to read it.
I prefer the current solution, so I merged the PR. I'll continue running some tests before a new release, but I'd like to release this fix as soon as possible.
Thanks!
This fixes #3 in a backwards compatible way. I'm not sure if this is the way to go though.
A simpler fix would return
Err(PcapParser::Eof)
from therefill
methods if the reader didn't return anything. This could break existing usages of the library though.Let me know which approach you prefer and I'll update the PR :)