/// Wait for the server task to join, and propagate panics.
Wait for the server task to join, and propagate panics.
Wait for the server task to join and propagate panics .
pub async fn join(mut self) {
        tracing::info!(addr = %self.addr, "trying to shut down support server...");
        tracing::debug!("draining...");
        self.drain.drain().await;
        tracing::debug!("drained!");
        if let Some(task) = self.task.take() {
            tracing::debug!("waiting for task to complete...");
            match task.await {
                Ok(res) => res.expect("support server failed"),
                // If the task panicked, propagate the panic so that the test can
                // fail nicely.
                Err(err) if err.is_panic() => {
                    tracing::error!("support server on {} panicked!", self.addr);
                    std::panic::resume_unwind(err.into_panic());
                }
                // If the task was already canceled, it was probably shut down
                // explicitly, that's fine.
                Err(_) => tracing::debug!("support server task already canceled"),
            }
            tracing::debug!("support server on {} terminated cleanly", self.addr);
        } else {
            tracing::debug!("support server task already joined");
        }
    }
pub async fn join ( mut self ) { tracing :: info ! ( addr self addr " " ) ; tracing :: debug ! ( " " ) ; self . drain . drain ( ) . await ; tracing :: debug ! ( " " ) ; if let Some ( task ) = self . task . take ( ) { tracing :: debug ! ( " " ) ; match task . await { Ok ( res ) => res . expect ( " " ) , // If the task panicked, propagate the panic so that the test can // fail nicely. Err ( err ) if err . is_panic ( ) => { tracing :: error ! ( " " self addr ) ; std :: panic :: resume_unwind ( err . into_panic ( ) ) ; } // If the task was already canceled, it was probably shut down // explicitly, that's fine. Err ( _ ) => tracing :: debug ! ( " " ) , } tracing :: debug ! ( " " self addr ) ; } else { tracing :: debug ! ( " " ) ; } }
Wait for the server task to join, and propagate panics.
Wait for the server task to join and propagate panics .
mut self