0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

modules/client/profile: Add conf item for remote request timeout.

This commit is contained in:
Jason Volk 2019-03-01 14:00:26 -08:00
parent 1d909b2ffc
commit ba2e81254b

View file

@ -232,6 +232,13 @@ get__profile_full(client &client,
return {};
}
conf::item<seconds>
remote_request_timeout
{
{ "name", "ircd.client.profile.remote_request.timeout" },
{ "default", 10L }
};
resource::response
get__profile_remote(client &client,
const resource::request &request,
@ -259,8 +266,8 @@ try
}
};
//TODO: conf
if(!federation_request.wait(seconds(8), std::nothrow))
const seconds &timeout(remote_request_timeout);
if(!federation_request.wait(timeout, std::nothrow))
throw m::error
{
http::GATEWAY_TIMEOUT, "M_PROFILE_TIMEOUT",