From 03527e79c7afd83bf92e64ea52554bf5465da44c Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Thu, 22 Feb 2024 22:18:24 +0800 Subject: [PATCH] fix: skip watch when tls disabled --- src/servers/src/tls.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/servers/src/tls.rs b/src/servers/src/tls.rs index c8308649df57..1c0be507e723 100644 --- a/src/servers/src/tls.rs +++ b/src/servers/src/tls.rs @@ -187,6 +187,10 @@ impl ReloadableTlsServerConfig { } pub fn watch_tls_config(tls_server_config: Arc) -> Result<()> { + if tls_server_config.get_tls_option().mode == TlsMode::Disable { + return Ok(()); + } + let tls_server_config_for_watcher = tls_server_config.clone(); let (tx, rx) = channel::>();