From 88971cd8700b725e105200af3d29847d4ca5f2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 18 Jul 2022 23:29:45 +0200 Subject: [PATCH] ws: rename enable_http_health_check to enable_http_health_checks --- aquatic_ws/src/config.rs | 4 ++-- aquatic_ws/src/lib.rs | 2 +- aquatic_ws/src/workers/socket.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aquatic_ws/src/config.rs b/aquatic_ws/src/config.rs index 7e41bd0..792e56a 100644 --- a/aquatic_ws/src/config.rs +++ b/aquatic_ws/src/config.rs @@ -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, } } } diff --git a/aquatic_ws/src/lib.rs b/aquatic_ws/src/lib.rs index 4fe33b3..ee75e86 100644 --- a/aquatic_ws/src/lib.rs +++ b/aquatic_ws/src/lib.rs @@ -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" )); diff --git a/aquatic_ws/src/workers/socket.rs b/aquatic_ws/src/workers/socket.rs index 49ab4fc..5be08f8 100644 --- a/aquatic_ws/src/workers/socket.rs +++ b/aquatic_ws/src/workers/socket.rs @@ -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