Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amigin committed Jul 31, 2024
1 parent e44b079 commit dc7241f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tcp_client/tcp_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const DEFAULT_SEND_TIMEOUT: Duration = Duration::from_secs(30);
pub struct TcpClient {
settings: Arc<dyn TcpClientSocketSettings + Send + Sync + 'static>,
re_connect_timeout: Duration,
seconds_to_ping: Duration,
seconds_to_ping: usize,
disconnect_timeout: Duration,
name: Arc<String>,
max_send_payload_size: usize,
Expand All @@ -41,7 +41,7 @@ impl TcpClient {
Self {
settings,
re_connect_timeout: Duration::from_secs(3),
seconds_to_ping: Duration::from_secs(3),
seconds_to_ping: 3,
disconnect_timeout: Duration::from_secs(9),
name: Arc::new(name),
max_send_payload_size: DEFAULT_MAX_SEND_PAYLOAD_SIZE,
Expand All @@ -52,8 +52,8 @@ impl TcpClient {
}
}

pub fn set_ping_interval(mut self, duration: Duration) -> Self {
self.seconds_to_ping = duration;
pub fn set_seconds_to_ping(mut self, seconds: usize) -> Self {
self.seconds_to_ping = seconds;
self
}

Expand Down

0 comments on commit dc7241f

Please sign in to comment.