From 807f3c45454f17d502b972a861947f1909e8b697 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 26 Mar 2018 16:53:24 -0700 Subject: [PATCH] ircd::ctx: view::wait_until() needs to throw on timeout. --- include/ircd/ctx/view.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/ircd/ctx/view.h b/include/ircd/ctx/view.h index 2acde0344..1cc149263 100644 --- a/include/ircd/ctx/view.h +++ b/include/ircd/ctx/view.h @@ -130,7 +130,8 @@ ircd::ctx::view::wait_until(lock &l, for(assert(l.owns_lock()); ready(); l.lock()) { l.unlock(); - q.wait_until(tp); + if(!q.wait_until(tp)) + throw timeout{}; } const unwind ul{[this] @@ -142,7 +143,8 @@ ircd::ctx::view::wait_until(lock &l, for(++waiting; !ready(); l.lock()) { l.unlock(); - q.wait_until(tp); + if(!q.wait_until(tp)) + throw timeout{}; } assert(t != nullptr);