@elupus Look at another side. As commented in code: "don't mark as eof while within the scan timeout". IMHO comment and code looks clear now, and changes will overcomplicate it.
But it's up to you.