mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 18:22:49 +02:00
feat(policy-server): Add configurable timeout
This commit is contained in:
parent
1726633c0f
commit
f335f45017
3 changed files with 36 additions and 1 deletions
|
@ -431,6 +431,23 @@ pub struct Config {
|
|||
#[serde(default = "default_federation_timeout")]
|
||||
pub federation_timeout: u64,
|
||||
|
||||
/// MSC4284 Policy server request timeout (seconds). Generally policy
|
||||
/// servers should respond near instantly, however may slow down under
|
||||
/// load. If a policy server doesn't respond in a short amount of time, the
|
||||
/// room it is configured in may become unusable if this limit is set too
|
||||
/// high. 10 seconds is a good default, however dropping this to 3-5 seconds
|
||||
/// can be acceptable.
|
||||
///
|
||||
/// Please be aware that policy requests are *NOT* currently re-tried, so if
|
||||
/// a spam check request fails, the event will be assumed to be not spam,
|
||||
/// which in some cases may result in spam being sent to or received from
|
||||
/// the room that would typically be prevented.
|
||||
///
|
||||
/// About policy servers: https://matrix.org/blog/2025/04/introducing-policy-servers/
|
||||
/// default: 10
|
||||
#[serde(default = "default_policy_server_request_timeout")]
|
||||
pub policy_server_request_timeout: u64,
|
||||
|
||||
/// Federation client idle connection pool timeout (seconds).
|
||||
///
|
||||
/// default: 25
|
||||
|
@ -2208,6 +2225,8 @@ fn default_federation_conn_timeout() -> u64 { 10 }
|
|||
|
||||
fn default_federation_timeout() -> u64 { 25 }
|
||||
|
||||
fn default_policy_server_request_timeout() -> u64 { 25 }
|
||||
|
||||
fn default_federation_idle_timeout() -> u64 { 25 }
|
||||
|
||||
fn default_federation_idle_per_host() -> u16 { 1 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue