diff --git a/modules/s_fetch.cc b/modules/s_fetch.cc index 678b70cb1..097e15630 100644 --- a/modules/s_fetch.cc +++ b/modules/s_fetch.cc @@ -27,7 +27,14 @@ decltype(ircd::m::fetch::timeout) ircd::m::fetch::timeout { { "name", "ircd.m.fetch.timeout" }, - { "default", 10L }, + { "default", 5L }, +}; + +decltype(ircd::m::fetch::auth_timeout) +ircd::m::fetch::auth_timeout +{ + { "name", "ircd.m.fetch.auth.timeout" }, + { "default", 15L }, }; decltype(ircd::m::fetch::hook) @@ -453,7 +460,7 @@ ircd::m::fetch::auth_chain(const room &room, room.room_id, room.event_id, buf, std::move(opts) }; - request.wait(seconds(20)); //TODO: conf + request.wait(seconds(auth_timeout)); //TODO: conf request.get(); const json::array &array { diff --git a/modules/s_fetch.h b/modules/s_fetch.h index f3eddb798..e8dbe9e87 100644 --- a/modules/s_fetch.h +++ b/modules/s_fetch.h @@ -24,6 +24,7 @@ namespace ircd::m::fetch extern ctx::context eval_context; extern ctx::context request_context; extern hookfn hook; + extern conf::item auth_timeout; extern conf::item timeout; extern conf::item enable;