fn handle_close_port_for_sub(&mut self, sub_id: &String, port_name: String) -> Result<()> {
    self.sub_manager.remove_port(&sub_id, &port_name)?;
    self
      .writelock_manager
      .unlock_port_if_locked_by(&port_name, &sub_id);
    // self.cleanup_ports_with_no_subs();
    let close_resp = SerialResponse::Closed {
      port: port_name.clone(),
    };
    self.send_message(&sub_id, close_resp);
    Ok(())
  }
/// Handle closing a signle port for a sub
Handle closing a signle port for a sub
Handle closing a signle port for a sub
fn handle_close_port_for_sub(&mut self, sub_id: &String, port_name: String) -> Result<()> {
    self.sub_manager.remove_port(&sub_id, &port_name)?;
    self
      .writelock_manager
      .unlock_port_if_locked_by(&port_name, &sub_id);
    // self.cleanup_ports_with_no_subs();
    let close_resp = SerialResponse::Closed {
      port: port_name.clone(),
    };
    self.send_message(&sub_id, close_resp);
    Ok(())
  }
fn handle_close_port_for_sub ( & mut self , sub_id : & String , port_name : String ) -> Result < ( ) > { self . sub_manager . remove_port ( & sub_id , & port_name ) ? ; self . writelock_manager . unlock_port_if_locked_by ( & port_name , & sub_id ) ; // self.cleanup_ports_with_no_subs(); let close_resp = SerialResponse :: Closed { port : port_name . clone ( ) , } ; self . send_message ( & sub_id , close_resp ) ; Ok ( ( ) ) }
Handle closing a signle port for a sub
Handle closing a signle port for a sub
&mut self
sub_id
&String
port_name
String
&mut self
sub_id
&String
port_name
String