libutil: throw EndOfFile at sourceToSink end

... how has this never broken anything before

Change-Id: If3789c02028e8f929481514f63d76b0b46bfc182
This commit is contained in:
eldritch horrors 2024-05-03 01:39:07 +02:00
parent 005b2b61e6
commit 29f93e1e0d

View file

@ -230,7 +230,7 @@ std::unique_ptr<FinishSink> sourceToSink(std::function<void(Source &)> fun)
if (cur.empty()) {
yield();
if (yield.get()) {
return (size_t)0;
throw EndOfFile("coroutine exhausted");
}
}