From 29f93e1e0d405440b35f1aa7c601dc5f601f9a90 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Fri, 3 May 2024 01:39:07 +0200 Subject: [PATCH] libutil: throw EndOfFile at sourceToSink end ... how has this never broken anything before Change-Id: If3789c02028e8f929481514f63d76b0b46bfc182 --- src/libutil/serialise.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc index 692144b75..a6cc919d2 100644 --- a/src/libutil/serialise.cc +++ b/src/libutil/serialise.cc @@ -230,7 +230,7 @@ std::unique_ptr sourceToSink(std::function fun) if (cur.empty()) { yield(); if (yield.get()) { - return (size_t)0; + throw EndOfFile("coroutine exhausted"); } }