TlsReloader cleanup
This commit is contained in:
parent
5c7bc03e5f
commit
ace649a8a1
2 changed files with 2 additions and 0 deletions
|
@ -374,6 +374,7 @@ struct TlsContext<'a> {
|
|||
tls_config: &'a TlsServerConfig,
|
||||
}
|
||||
impl TlsContext<'_> {
|
||||
#[inline]
|
||||
pub fn tls_acceptor(&mut self) -> &Arc<TlsAcceptor> {
|
||||
if self.tls_reloader.should_reload_certificate() {
|
||||
match tls::tls_acceptor(self.tls_config, Some(vec![b"http/1.1".to_vec()])) {
|
||||
|
|
|
@ -56,6 +56,7 @@ impl TlsReloader {
|
|||
Ok(Self { state: Some(this) })
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn should_reload_certificate(&self) -> bool {
|
||||
match &self.state {
|
||||
None => false,
|
||||
|
|
Loading…
Reference in a new issue