From 2e96d6fe3bf12abaee6fc53da5de58e62f78187e Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 4 Sep 2018 23:19:26 -0700 Subject: [PATCH] modules/client/rooms/join: Add conf items for bootstrap timeouts. --- modules/client/rooms/join.cc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/client/rooms/join.cc b/modules/client/rooms/join.cc index c5323e66c..a7f4e38f9 100644 --- a/modules/client/rooms/join.cc +++ b/modules/client/rooms/join.cc @@ -130,6 +130,20 @@ join__alias_user(const m::room::alias &room_alias, return join__room_user(room_id, user_id); } +conf::item +make_join_timeout +{ + { "name", "ircd.client.rooms.join.make_join.timeout" }, + { "default", 15L }, +}; + +conf::item +send_join_timeout +{ + { "name", "ircd.client.rooms.join_send_join.timeout" }, + { "default", 45L /* spinappse */ }, +}; + static event::id::buf bootstrap(const string_view &host, const m::room::id &room_id, @@ -145,7 +159,7 @@ bootstrap(const string_view &host, room_id, user_id, buf, { host } }; - request.wait(seconds(8)); //TODO: conf + request.wait(seconds(make_join_timeout)); const auto code { request.get() @@ -266,7 +280,7 @@ bootstrap(const string_view &host, room_id, event_id, strung, buf2, { host } }; - sj.wait(seconds(8)); //TODO: conf + sj.wait(seconds(send_join_timeout)); const auto sjcode {