File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -353,18 +353,12 @@ impl Future for ServerWorker {
353
353
return Poll :: Ready ( ( ) ) ;
354
354
} else if graceful {
355
355
self . shutdown ( false ) ;
356
- let num = num_connections ( ) ;
357
- if num != 0 {
358
- info ! ( "Graceful worker shutdown, {} connections" , num) ;
359
- self . state = WorkerState :: Shutdown (
360
- Box :: pin ( sleep ( Duration :: from_secs ( 1 ) ) ) ,
361
- Box :: pin ( sleep ( self . config . shutdown_timeout ) ) ,
362
- Some ( result) ,
363
- ) ;
364
- } else {
365
- let _ = result. send ( true ) ;
366
- return Poll :: Ready ( ( ) ) ;
367
- }
356
+ info ! ( "Graceful worker shutdown, {} connections" , num) ;
357
+ self . state = WorkerState :: Shutdown (
358
+ Box :: pin ( sleep ( Duration :: from_secs ( 1 ) ) ) ,
359
+ Box :: pin ( sleep ( self . config . shutdown_timeout ) ) ,
360
+ Some ( result) ,
361
+ ) ;
368
362
} else {
369
363
info ! ( "Force shutdown worker, {} connections" , num) ;
370
364
self . shutdown ( true ) ;
You can’t perform that action at this time.
0 commit comments