mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-25 02:06:28 +00:00
Set client state to idle after error (#179)
* Set client state to idle after error * fmt * spelling * clean up
This commit is contained in:
committed by
GitHub
parent
e84a6f834c
commit
af064ef447
10
src/stats.rs
10
src/stats.rs
@@ -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),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user