mirror of
https://github.com/telemt/telemt.git
synced 2026-04-18 11:04:09 +03:00
feat: make max_connections configurable via [server] section
The concurrent connection limit was hardcoded to 10,000. Add server.max_connections config option (default: 10000, 0 = unlimited).
This commit is contained in:
@@ -1167,6 +1167,11 @@ pub struct ServerConfig {
|
||||
|
||||
#[serde(default)]
|
||||
pub listeners: Vec<ListenerConfig>,
|
||||
|
||||
/// Maximum number of concurrent client connections.
|
||||
/// 0 means unlimited.
|
||||
#[serde(default = "default_server_max_connections")]
|
||||
pub max_connections: u32,
|
||||
}
|
||||
|
||||
impl Default for ServerConfig {
|
||||
@@ -1184,6 +1189,7 @@ impl Default for ServerConfig {
|
||||
metrics_whitelist: default_metrics_whitelist(),
|
||||
api: ApiConfig::default(),
|
||||
listeners: Vec::new(),
|
||||
max_connections: default_server_max_connections(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user