From 630a506a7e14f21d98ce0922739a66d89d6d2dd0 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Wed, 1 Apr 2020 16:19:46 +0200 Subject: [PATCH] Re-export OneShotHandlerConfig. Make fields public. --- swarm/src/lib.rs | 1 + swarm/src/protocols_handler.rs | 2 +- swarm/src/protocols_handler/one_shot.rs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/swarm/src/lib.rs b/swarm/src/lib.rs index 097bc991aba..11bb1a054b5 100644 --- a/swarm/src/lib.rs +++ b/swarm/src/lib.rs @@ -77,6 +77,7 @@ pub use protocols_handler::{ ProtocolsHandlerSelect, ProtocolsHandlerUpgrErr, OneShotHandler, + OneShotHandlerConfig, SubstreamProtocol }; diff --git a/swarm/src/protocols_handler.rs b/swarm/src/protocols_handler.rs index 160989180a9..95722ed9388 100644 --- a/swarm/src/protocols_handler.rs +++ b/swarm/src/protocols_handler.rs @@ -63,7 +63,7 @@ pub use dummy::DummyProtocolsHandler; pub use map_in::MapInEvent; pub use map_out::MapOutEvent; pub use node_handler::{NodeHandlerWrapper, NodeHandlerWrapperBuilder, NodeHandlerWrapperError}; -pub use one_shot::OneShotHandler; +pub use one_shot::{OneShotHandler, OneShotHandlerConfig}; pub use select::{IntoProtocolsHandlerSelect, ProtocolsHandlerSelect}; /// A handler for a set of protocols used on a connection with a remote. diff --git a/swarm/src/protocols_handler/one_shot.rs b/swarm/src/protocols_handler/one_shot.rs index 3bcac1e7a2e..92d63088895 100644 --- a/swarm/src/protocols_handler/one_shot.rs +++ b/swarm/src/protocols_handler/one_shot.rs @@ -245,9 +245,9 @@ where #[derive(Debug)] pub struct OneShotHandlerConfig { /// After the given duration has elapsed, an inactive connection will shutdown. - inactive_timeout: Duration, + pub inactive_timeout: Duration, /// Timeout duration for each newly opened outbound substream. - substream_timeout: Duration, + pub substream_timeout: Duration, } impl Default for OneShotHandlerConfig {