mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-28 03:06:29 +00:00
Really fix idle servers (#141)
This commit is contained in:
@@ -1011,10 +1011,10 @@ impl<S, T> Drop for Client<S, T> {
|
|||||||
|
|
||||||
// Dirty shutdown
|
// Dirty shutdown
|
||||||
// TODO: refactor, this is not the best way to handle state management.
|
// TODO: refactor, this is not the best way to handle state management.
|
||||||
if self.connected_to_server {
|
|
||||||
if let Some(address_id) = self.last_address_id {
|
if let Some(address_id) = self.last_address_id {
|
||||||
self.stats.client_disconnecting(self.process_id, address_id);
|
self.stats.client_disconnecting(self.process_id, address_id);
|
||||||
|
|
||||||
|
if self.connected_to_server {
|
||||||
if let Some(process_id) = self.last_server_id {
|
if let Some(process_id) = self.last_server_id {
|
||||||
self.stats.server_idle(process_id, address_id);
|
self.stats.server_idle(process_id, address_id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user