0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-30 02:32:43 +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 {}; return {};
} }
conf::item<seconds>
remote_request_timeout
{
{ "name", "ircd.client.profile.remote_request.timeout" },
{ "default", 10L }
};
resource::response resource::response
get__profile_remote(client &client, get__profile_remote(client &client,
const resource::request &request, const resource::request &request,
@ -259,8 +266,8 @@ try
} }
}; };
//TODO: conf const seconds &timeout(remote_request_timeout);
if(!federation_request.wait(seconds(8), std::nothrow)) if(!federation_request.wait(timeout, std::nothrow))
throw m::error throw m::error
{ {
http::GATEWAY_TIMEOUT, "M_PROFILE_TIMEOUT", http::GATEWAY_TIMEOUT, "M_PROFILE_TIMEOUT",