File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ pub async fn client_entrypoint(
204
204
Ok ( mut client) => {
205
205
info ! ( "Client {:?} connected (plain)" , addr) ;
206
206
207
- if client. is_admin ( ) {
207
+ if ! client. is_admin ( ) {
208
208
let _ = drain. send ( 1 ) . await ;
209
209
}
210
210
@@ -229,7 +229,7 @@ pub async fn client_entrypoint(
229
229
Ok ( mut client) => {
230
230
info ! ( "Client {:?} issued a cancel query request" , addr) ;
231
231
232
- if client. is_admin ( ) {
232
+ if ! client. is_admin ( ) {
233
233
let _ = drain. send ( 1 ) . await ;
234
234
}
235
235
Original file line number Diff line number Diff line change @@ -221,13 +221,16 @@ async fn main() {
221
221
interval. tick( ) . await ;
222
222
223
223
// We're done waiting.
224
- error!( "Timed out waiting for clients" ) ;
224
+ error!( "Graceful shutdown timed out. {} active clients being closed" , total_clients ) ;
225
225
226
226
let _ = exit_tx. send( ( ) ) . await ;
227
227
} ) ;
228
228
} ,
229
229
230
- _ = term_signal. recv( ) => break ,
230
+ _ = term_signal. recv( ) => {
231
+ info!( "Got SIGTERM, closing with {} clients active" , total_clients) ;
232
+ break ;
233
+ } ,
231
234
232
235
new_client = listener. accept( ) => {
233
236
let ( socket, addr) = match new_client {
You can’t perform that action at this time.
0 commit comments