Feature/tcp client connection timeout (#176)
* Added timeout values to configs * Fixed possible crash when using delay larger than 2 years * Connection timeout with hardcoded value * Using provided timeout value * tcp client requiring timeout value at construction * Client using updated tcp client * Mixnode using updated tcp client * Healthchecker having separate timeout + new client config field * Updated validator with connection timeout field * Added connection_timeout to validator config template
This commit is contained in:
committed by
GitHub
parent
7e1c957090
commit
3b6110a42e
@@ -95,6 +95,7 @@ impl MixNode {
|
||||
packet_forwarding::PacketForwarder::new(
|
||||
self.config.get_packet_forwarding_initial_backoff(),
|
||||
self.config.get_packet_forwarding_maximum_backoff(),
|
||||
self.config.get_initial_connection_timeout(),
|
||||
)
|
||||
})
|
||||
.start(self.runtime.handle())
|
||||
|
||||
@@ -14,10 +14,12 @@ impl PacketForwarder {
|
||||
pub(crate) fn new(
|
||||
initial_reconnection_backoff: Duration,
|
||||
maximum_reconnection_backoff: Duration,
|
||||
initial_connection_timeout: Duration,
|
||||
) -> PacketForwarder {
|
||||
let tcp_client_config = multi_tcp_client::Config::new(
|
||||
initial_reconnection_backoff,
|
||||
maximum_reconnection_backoff,
|
||||
initial_connection_timeout,
|
||||
);
|
||||
|
||||
let (conn_tx, conn_rx) = mpsc::unbounded();
|
||||
|
||||
Reference in New Issue
Block a user