0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-01 19:22:53 +01:00

modules/m_init_backfill: Reference a static dummy instance for when_any().

This commit is contained in:
Jason Volk 2019-09-08 17:11:28 -07:00
parent 0bc027ebab
commit b3fc7bdb35

View file

@ -290,9 +290,14 @@ ircd::m::fetch::request_handle()
static const auto dereferencer{[] static const auto dereferencer{[]
(auto &it) -> server::request & (auto &it) -> server::request &
{ {
// If the request doesn't have a server::request future attached
// during this pass we reference this default constructed static
// instance which when_any() will treat as a no-op.
static server::request request_skip;
auto &request(mutable_cast(*it)); auto &request(mutable_cast(*it));
assert(request.future); return request.future?
return *request.future; *request.future:
request_skip;
}}; }};
auto next auto next