From 21877c240bf96da08efa4d7669482db71186efbd Mon Sep 17 00:00:00 2001 From: Jedrzej Stuczynski Date: Mon, 3 Feb 2020 11:56:39 +0000 Subject: [PATCH] Added topology resolution timeout to client debug config --- nym-client/src/config/mod.rs | 9 ++++++++- nym-client/src/config/template.rs | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/nym-client/src/config/mod.rs b/nym-client/src/config/mod.rs index 09ff35e47a..375085c737 100644 --- a/nym-client/src/config/mod.rs +++ b/nym-client/src/config/mod.rs @@ -13,6 +13,7 @@ const DEFAULT_MESSAGE_STREAM_AVERAGE_DELAY: u64 = 500; const DEFAULT_AVERAGE_PACKET_DELAY: u64 = 200; const DEFAULT_FETCH_MESSAGES_DELAY: u64 = 1000; const DEFAULT_TOPOLOGY_REFRESH_RATE: u64 = 10_000; +const DEFAULT_TOPOLOGY_RESOLUTION_TIMEOUT: u64 = 5_000; const DEFAULT_LISTENING_PORT: u16 = 9001; @@ -329,7 +330,12 @@ pub struct Debug { /// meaning it will always try to use whatever it obtained on startup. /// The provided value is interpreted as milliseconds. topology_refresh_rate: u64, - // topology resolution timeout + + /// During initial healthcheck, test packets are sent through every single possible network + /// path. This timeout determines waiting period until it is decided that the packet + /// did not reach its destination. + /// The provided value is interpreted as milliseconds. + topology_resolution_timeout: u64, } impl Default for Debug { @@ -341,6 +347,7 @@ impl Default for Debug { message_sending_average_delay: DEFAULT_MESSAGE_STREAM_AVERAGE_DELAY, rate_compliant_cover_messages_disabled: false, topology_refresh_rate: DEFAULT_TOPOLOGY_REFRESH_RATE, + topology_resolution_timeout: DEFAULT_TOPOLOGY_RESOLUTION_TIMEOUT, } } } diff --git a/nym-client/src/config/template.rs b/nym-client/src/config/template.rs index e716eca179..31e739aa3d 100644 --- a/nym-client/src/config/template.rs +++ b/nym-client/src/config/template.rs @@ -101,5 +101,11 @@ rate_compliant_cover_messages_disabled = {{ debug.rate_compliant_cover_messages_ # The provided value is interpreted as milliseconds. topology_refresh_rate = {{ debug.topology_refresh_rate }} +# During initial healthcheck, test packets are sent through every single possible network +# path. This timeout determines waiting period until it is decided that the packet +# did not reach its destination. +# The provided value is interpreted as milliseconds. +topology_resolution_timeout = {{ debug.topology_resolution_timeout }} + "# }