pub fn heartbeat_timeout(&mut self, id: ClientId, client_state: ClientState) {
        info!("heartbeat timeout: {}({})", id, client_state);
        self.emit_event(Event::Remove(id));
        match client_state {
            ClientState::Selected => self.counters.selected -= 1,
            ClientState::Waiting => self.counters.waiting -= 1,
            ClientState::Unknown => {
                panic!("Unknown client {} does not have a heartbeat", id);
            }
            ClientState::DoneAndInactive => {
                panic!("Done and inactive client {} does not have a heartbeat", id);
            }
            ClientState::Done => {
                self.emit_event(Event::SetState(id, ClientState::DoneAndInactive));
                self.counters.done_and_inactive += 1;
            }
            ClientState::Ignored => {
                self.counters.ignored -= 1;
            }
        }
        self.maybe_start_selection();
    }
/// Handle a heartbeat timeout for the given client.
Handle a heartbeat timeout for the given client.
Handle a heartbeat timeout for the given client .
pub fn heartbeat_timeout(&mut self, id: ClientId, client_state: ClientState) {
        info!("heartbeat timeout: {}({})", id, client_state);
        self.emit_event(Event::Remove(id));
        match client_state {
            ClientState::Selected => self.counters.selected -= 1,
            ClientState::Waiting => self.counters.waiting -= 1,
            ClientState::Unknown => {
                panic!("Unknown client {} does not have a heartbeat", id);
            }
            ClientState::DoneAndInactive => {
                panic!("Done and inactive client {} does not have a heartbeat", id);
            }
            ClientState::Done => {
                self.emit_event(Event::SetState(id, ClientState::DoneAndInactive));
                self.counters.done_and_inactive += 1;
            }
            ClientState::Ignored => {
                self.counters.ignored -= 1;
            }
        }
        self.maybe_start_selection();
    }
pub fn heartbeat_timeout ( & mut self , id : ClientId , client_state : ClientState ) { info ! ( " " id client_state ) ; self . emit_event ( Event :: Remove ( id ) ) ; match client_state { ClientState :: Selected => self . counters . selected -= 1 , ClientState :: Waiting => self . counters . waiting -= 1 , ClientState :: Unknown => { panic ! ( " " id ) ; } ClientState :: DoneAndInactive => { panic ! ( " " id ) ; } ClientState :: Done => { self . emit_event ( Event :: SetState ( id , ClientState :: DoneAndInactive ) ) ; self . counters . done_and_inactive += 1 ; } ClientState :: Ignored => { self . counters . ignored -= 1 ; } } self . maybe_start_selection ( ) ; }
Handle a heartbeat timeout for the given client.
Handle a heartbeat timeout for the given client .
&mut self
id
ClientId
client_state
ClientState
&mut self
id
ClientId
client_state
ClientState