diff --git a/matrix/keys.cc b/matrix/keys.cc index c7ae7969b..fd31bd205 100644 --- a/matrix/keys.cc +++ b/matrix/keys.cc @@ -225,8 +225,11 @@ try queries, buf, std::move(opts) }; - request.wait(milliseconds(keys_query_timeout)); - const auto &code(request.get()); + const auto &code + { + request.get(milliseconds(keys_query_timeout)) + }; + const json::array response { request @@ -343,10 +346,9 @@ try {query}, buf, std::move(opts) }; - request.wait(milliseconds(keys_get_timeout)); - const auto &status + const auto status { - request.get() + request.get(milliseconds(keys_get_timeout)) }; // note fed::key::query gives us "server_keys" array via cast operator. diff --git a/matrix/room_aliases.cc b/matrix/room_aliases.cc index 9e9c9e622..bf73065f9 100644 --- a/matrix/room_aliases.cc +++ b/matrix/room_aliases.cc @@ -360,10 +360,9 @@ try alias, buf, std::move(opts) }; - request.wait(seconds(alias_fetch_timeout)); const http::code &code { - request.get() + request.get(seconds(alias_fetch_timeout)) }; const json::object response diff --git a/matrix/room_bootstrap.cc b/matrix/room_bootstrap.cc index 9fd8d27ab..a6a925e7d 100644 --- a/matrix/room_bootstrap.cc +++ b/matrix/room_bootstrap.cc @@ -453,11 +453,9 @@ try room_id, buf, std::move(opts) }; - request.wait(seconds(backfill_timeout)); - const auto code { - request.get() + request.get(seconds(backfill_timeout)) }; const json::object &response @@ -578,11 +576,9 @@ try room_id, event_id, event, buf, std::move(opts) }; - send_join.wait(seconds(send_join_timeout)); - const auto send_join_code { - send_join.get() + send_join.get(seconds(send_join_timeout)) }; const json::array send_join_response @@ -642,10 +638,9 @@ try room_id, user_id, buf, std::move(opts) }; - request.wait(seconds(make_join_timeout)); const auto code { - request.get() + request.get(seconds(make_join_timeout)) }; const json::object &response diff --git a/matrix/room_head.cc b/matrix/room_head.cc index b8de9c7e3..17d9eeab0 100644 --- a/matrix/room_head.cc +++ b/matrix/room_head.cc @@ -60,8 +60,10 @@ ircd::m::room::head::fetch(const id &room_id, room_id, user_id, buf, std::move(opts) }; - request.wait(milliseconds(fetch_timeout)); - request.get(); + const auto code + { + request.get(milliseconds(fetch_timeout)) + }; const json::object proto {