diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2024-02-14 16:15:03 +0100 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2024-02-14 16:20:24 +0100 |
commit | f17d2c04bd0e6a9f39e021093f2e6073ea013d79 (patch) | |
tree | 6627e09b77b661de1b385e18d6f81c19e6ea16f4 /hbak_common/src/conn.rs | |
parent | 8a1078f02f695aa0bc24a108f8c4735330bfd87d (diff) |
hbakd: graceful shutdown on SIGINT, SIGTERM and SIGHUP
Diffstat (limited to 'hbak_common/src/conn.rs')
-rw-r--r-- | hbak_common/src/conn.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hbak_common/src/conn.rs b/hbak_common/src/conn.rs index dca5769..e50d868 100644 --- a/hbak_common/src/conn.rs +++ b/hbak_common/src/conn.rs @@ -24,8 +24,9 @@ pub const DEFAULT_PORT: u16 = 20406; /// TCP connect timeout. Connection attempt is aborted if remote doesn't respond. pub const CONNECT_TIMEOUT: Duration = Duration::from_secs(30); -/// TCP read timeout. Internal value for [`StreamConn::data_sync`] receive thread cancellation. -const READ_TIMEOUT: Duration = Duration::from_millis(200); +/// TCP read timeout. Used for cancellation of [`StreamConn::data_sync`] receive thread +/// and `hbakd` TCP accept loop. +pub const READ_TIMEOUT: Duration = Duration::from_millis(200); mod private { pub trait Sealed {} |