mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-25 02:06:28 +00:00
Patch graceful shutdown bug (#157)
* Fixes non-admin client counting error * Add log when sigterm received and log number of active clients when shutdown timeout is reached
This commit is contained in:
@@ -204,7 +204,7 @@ pub async fn client_entrypoint(
|
||||
Ok(mut client) => {
|
||||
info!("Client {:?} connected (plain)", addr);
|
||||
|
||||
if client.is_admin() {
|
||||
if !client.is_admin() {
|
||||
let _ = drain.send(1).await;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ pub async fn client_entrypoint(
|
||||
Ok(mut client) => {
|
||||
info!("Client {:?} issued a cancel query request", addr);
|
||||
|
||||
if client.is_admin() {
|
||||
if !client.is_admin() {
|
||||
let _ = drain.send(1).await;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user