ws: rename enable_http_health_check to enable_http_health_checks

This commit is contained in:
Joakim Frostegård 2022-07-18 23:29:45 +02:00
parent a16ce91d46
commit 88971cd870
3 changed files with 4 additions and 4 deletions

View file

@ -72,7 +72,7 @@ pub struct NetworkConfig {
/// Return a HTTP 200 Ok response when receiving GET /health, but only
/// when not running over TLS
pub enable_http_health_check: bool,
pub enable_http_health_checks: bool,
}
impl Default for NetworkConfig {
@ -89,7 +89,7 @@ impl Default for NetworkConfig {
websocket_max_message_size: 64 * 1024,
websocket_max_frame_size: 16 * 1024,
enable_http_health_check: false,
enable_http_health_checks: false,
}
}
}

View file

@ -26,7 +26,7 @@ pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION");
pub const SHARED_IN_CHANNEL_SIZE: usize = 1024;
pub fn run(config: Config) -> ::anyhow::Result<()> {
if config.network.enable_tls && config.network.enable_http_health_check {
if config.network.enable_tls && config.network.enable_http_health_checks {
return Err(anyhow::anyhow!(
"configuration: network.enable_tls and network.enable_http_health_check can't both be set to true"
));

View file

@ -298,7 +298,7 @@ async fn run_connection(
)
.await
} else {
if config.network.enable_http_health_check {
if config.network.enable_http_health_checks {
let mut peek_buf = [0u8; 11];
stream