mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-09 06:38:32 -04:00
Attempt to not cause graceful shutdown too quickly
This commit is contained in:
parent
a70e57ff1d
commit
fa92c75497
1 changed files with 5 additions and 1 deletions
|
@ -420,7 +420,11 @@ async fn virtual_tcp_interface(
|
|||
}
|
||||
}
|
||||
}
|
||||
if !graceful_shutdown && !forceful_shutdown && !client_socket.is_active() {
|
||||
if !graceful_shutdown
|
||||
&& !forceful_shutdown
|
||||
&& !client_socket.is_active()
|
||||
&& !client_socket.can_recv()
|
||||
{
|
||||
// Graceful shutdown
|
||||
client_socket.close();
|
||||
trace!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue