You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: walreceiver.rs
    path of file: ./repos/neon/pageserver/src/tenant/timeline
    
    the code of the file until where you have to start completion: //! WAL receiver manages an open connection to safekeeper, to get the WAL it streams into.
//! To do so, a current implementation needs to do th
    
    async fn shutdown(self) {
        if let Some(jh) = self.join_handle {
            self.cancellation.cancel();
            match jh.await {
                Ok(Ok(())) => debug!("Shutdown success"),
                Ok(Err(e)) => error!("Shutdown task error: {e:?}"),
                Err(je) if je.is_cancelled() => unreachable!("not used"),
                Err(je) if je.is_panic() => {
                    // already logged
                }
                Err(je) => {
                    error!("Shutdown task join error: {je}")
                }
            }
        }
    }