0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

ircd::ctx: Fix future wait condition closing.

This commit is contained in:
Jason Volk 2019-07-19 14:45:36 -07:00
parent 51e3d7f081
commit 3301ed62f7

View file

@ -351,18 +351,10 @@ ircd::ctx::_wait_until(const future<T> &f,
if(unlikely(is(state, future_state::INVALID)))
throw no_state{};
const auto wfun
return state.cond.wait_until(tp, [&state]
{
[&state]
{
return !is(state, future_state::PENDING);
}
};
if(unlikely(!state.cond.wait_until(tp, wfun)))
return false;
return wfun();
return !is(state, future_state::PENDING);
});
}
template<class T>