mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
ws: auto-close connections after grace period when updating tls config
This commit is contained in:
parent
99647a323a
commit
78645fe658
2 changed files with 33 additions and 1 deletions
|
|
@ -158,6 +158,11 @@ pub struct CleaningConfig {
|
|||
pub connection_cleaning_interval: u64,
|
||||
/// Close connections if no responses have been sent to them for this long (seconds)
|
||||
pub max_connection_idle: u32,
|
||||
/// After updating TLS certificates, close connections running with
|
||||
/// previous certificates after this long (seconds)
|
||||
///
|
||||
/// Countdown starts at next connection cleaning.
|
||||
pub close_after_tls_update_grace_period: u32,
|
||||
}
|
||||
|
||||
impl Default for CleaningConfig {
|
||||
|
|
@ -167,6 +172,7 @@ impl Default for CleaningConfig {
|
|||
max_peer_age: 1800,
|
||||
max_connection_idle: 60 * 5,
|
||||
connection_cleaning_interval: 30,
|
||||
close_after_tls_update_grace_period: 60 * 60 * 60,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue