pub async fn cleanup_connection(&mut self, conn_id: usize) {
        debug!("<Conn @ {:?}> Cleaning up state", conn_id);
        if let Some(ids) = self.client_processes.remove(&conn_id) {
            for id in ids {
                if let Some(process) = self.processes.remove(&id) {
                    if !process.detached {
                        trace!(
                            "<Conn @ {:?}> Requesting proc {} be killed",
                            conn_id,
                            process.id
                        );
                        let pid = process.id;
                        if !process.kill() {
                            error!("Conn {} failed to send process {} kill signal", id, pid);
                        }
                    } else {
                        trace!(
                            "<Conn @ {:?}> Proc {} is detached and will not be killed",
                            conn_id,
                            process.id
                        );
                    }
                }
            }
        }
    }
/// Cleans up state associated with a particular connection
Cleans up state associated with a particular connection
Cleans up state associated with a particular connection
pub async fn cleanup_connection(&mut self, conn_id: usize) {
        debug!("<Conn @ {:?}> Cleaning up state", conn_id);
        if let Some(ids) = self.client_processes.remove(&conn_id) {
            for id in ids {
                if let Some(process) = self.processes.remove(&id) {
                    if !process.detached {
                        trace!(
                            "<Conn @ {:?}> Requesting proc {} be killed",
                            conn_id,
                            process.id
                        );
                        let pid = process.id;
                        if !process.kill() {
                            error!("Conn {} failed to send process {} kill signal", id, pid);
                        }
                    } else {
                        trace!(
                            "<Conn @ {:?}> Proc {} is detached and will not be killed",
                            conn_id,
                            process.id
                        );
                    }
                }
            }
        }
    }
pub async fn cleanup_connection ( & mut self , conn_id : usize ) { debug ! ( " " conn_id ) ; if let Some ( ids ) = self . client_processes . remove ( & conn_id ) { for id in ids { if let Some ( process ) = self . processes . remove ( & id ) { if ! process . detached { trace ! ( " " conn_id process id ) ; let pid = process . id ; if ! process . kill ( ) { error ! ( " " id pid ) ; } } else { trace ! ( " " conn_id process id ) ; } } } } }
Cleans up state associated with a particular connection
Cleans up state associated with a particular connection
&mut self
conn_id
usize