pub async fn respawn_with_new_cert(&mut self, cert: &TlsPayload) -> Result<(), Error> {
        // stop old server immediately. if this were graceful, it would wait for all keep-alive
        // connections to close off first.
        self.shutdown(false).await;

        let acceptor =
            Self::create_openssl_acceptor(Arc::clone(&self.gs), cert).map_err(Error::Acceptor)?;

        let srv = spawn_http_server(Arc::clone(&self.gs), acceptor).map_err(Error::Port)?;
        self.actix = srv;

        Ok(())
    }
/// Forcefully shuts down the last instance of the Actix Web Server, respawning with a new
/// fullchain certificate and private key for SSL.
// NOTE: Unfortunately, there is no way (to my knowledge) to change SSL cert while the Actix
// Web server is running, therefore it must be shutdown and respawned
Forcefully shuts down the last instance of the Actix Web Server, respawning with a new
fullchain certificate and private key for SSL.
NOTE: Unfortunately, there is no way (to my knowledge) to change SSL cert while the Actix
Web server is running, therefore it must be shutdown and respawned
Forcefully shuts down the last instance of the Actix Web Server respawning with a new fullchain certificate and private key for SSL . NOTE : Unfortunately there is no way ( to my knowledge ) to change SSL cert while the Actix Web server is running therefore it must be shutdown and respawned
pub async fn respawn_with_new_cert(&mut self, cert: &TlsPayload) -> Result<(), Error> {
        // stop old server immediately. if this were graceful, it would wait for all keep-alive
        // connections to close off first.
        self.shutdown(false).await;
        let acceptor =
            Self::create_openssl_acceptor(Arc::clone(&self.gs), cert).map_err(Error::Acceptor)?;
        let srv = spawn_http_server(Arc::clone(&self.gs), acceptor).map_err(Error::Port)?;
        self.actix = srv;
        Ok(())
    }
pub async fn respawn_with_new_cert ( & mut self , cert : & TlsPayload ) -> Result < ( ) , Error > { // stop old server immediately. if this were graceful, it would wait for all keep-alive // connections to close off first. self . shutdown ( false ) . await ; let acceptor = Self :: create_openssl_acceptor ( Arc :: clone ( & self . gs ) , cert ) . map_err ( Error :: Acceptor ) ? ; let srv = spawn_http_server ( Arc :: clone ( & self . gs ) , acceptor ) . map_err ( Error :: Port ) ? ; self . actix = srv ; Ok ( ( ) ) }
Forcefully shuts down the last instance of the Actix Web Server, respawning with a new
fullchain certificate and private key for SSL.
Forcefully shuts down the last instance of the Actix Web Server respawning with a new fullchain certificate and private key for SSL .
&mut self
cert
&TlsPayload