Set client state to idle after error (#179)

* Set client state to idle after error

* fmt

* spelling

* clean up
This commit is contained in:
Mostafa Abdelraouf
2022-09-24 11:09:15 -05:00
committed by GitHub
parent e84a6f834c
commit af064ef447
2 changed files with 38 additions and 2 deletions

View File

@@ -740,7 +740,10 @@ impl Collector {
address_id,
} => {
match client_states.get_mut(&client_id) {
Some(client_info) => client_info.error_count += stat.value as u64,
Some(client_info) => {
client_info.state = ClientState::Idle;
client_info.error_count += stat.value as u64;
}
None => warn!("Got event {:?} for unregistered client", stat.name),
}
@@ -757,7 +760,10 @@ impl Collector {
address_id,
} => {
match client_states.get_mut(&client_id) {
Some(client_info) => client_info.error_count += stat.value as u64,
Some(client_info) => {
client_info.state = ClientState::Idle;
client_info.error_count += stat.value as u64;
}
None => warn!("Got event {:?} for unregistered client", stat.name),
}