From ace649a8a12c0c109dab5c255b4ed928f8f1fabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3rebe=20-=20Romain=20GERARD?= Date: Sat, 30 Dec 2023 23:38:05 +0100 Subject: [PATCH] TlsReloader cleanup --- src/tunnel/server.rs | 1 + src/tunnel/tls_reloader.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/tunnel/server.rs b/src/tunnel/server.rs index 8fe7b99..9a573d7 100644 --- a/src/tunnel/server.rs +++ b/src/tunnel/server.rs @@ -374,6 +374,7 @@ struct TlsContext<'a> { tls_config: &'a TlsServerConfig, } impl TlsContext<'_> { + #[inline] pub fn tls_acceptor(&mut self) -> &Arc { if self.tls_reloader.should_reload_certificate() { match tls::tls_acceptor(self.tls_config, Some(vec![b"http/1.1".to_vec()])) { diff --git a/src/tunnel/tls_reloader.rs b/src/tunnel/tls_reloader.rs index df18965..47ae570 100644 --- a/src/tunnel/tls_reloader.rs +++ b/src/tunnel/tls_reloader.rs @@ -56,6 +56,7 @@ impl TlsReloader { Ok(Self { state: Some(this) }) } + #[inline] pub fn should_reload_certificate(&self) -> bool { match &self.state { None => false,