diff --git a/CHANGES.md b/CHANGES.md index 45d346d..bba0395 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changes +## [0.12.5] - 2023-10-23 + +* Fix typo + ## [0.12.4] - 2023-10-03 * Fix nested error handling for control service diff --git a/Cargo.toml b/Cargo.toml index 9585184..c01ed2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntex-mqtt" -version = "0.12.4" +version = "0.12.5" authors = ["ntex contributors "] description = "Client and Server framework for MQTT v5 and v3.1.1 protocols" documentation = "https://docs.rs/ntex-mqtt" diff --git a/src/server.rs b/src/server.rs index 6565e28..f6db605 100644 --- a/src/server.rs +++ b/src/server.rs @@ -57,6 +57,13 @@ impl MqttServer { /// Mqtt::Handshake(HandshakeError::Timeout) error. /// /// By default, connect timeuot is 10 seconds. + pub fn connect_timeout(mut self, timeout: Seconds) -> Self { + self.connect_timeout = timeout.into(); + self + } + + #[deprecated(since = "0.12.5")] + #[doc(hidden)] pub fn conenct_timeout(mut self, timeout: Seconds) -> Self { self.connect_timeout = timeout.into(); self diff --git a/src/v3/selector.rs b/src/v3/selector.rs index 9619f23..36f9506 100644 --- a/src/v3/selector.rs +++ b/src/v3/selector.rs @@ -54,6 +54,13 @@ where /// Mqtt::Handshake(HandshakeError::Timeout) error. /// /// By default, connect timeuot is 10 seconds. + pub fn connect_timeout(mut self, timeout: Seconds) -> Self { + self.connect_timeout = timeout.into(); + self + } + + #[deprecated(since = "0.12.5")] + #[doc(hidden)] pub fn conenct_timeout(mut self, timeout: Seconds) -> Self { self.connect_timeout = timeout.into(); self diff --git a/src/v3/server.rs b/src/v3/server.rs index e58eb5d..d52753c 100644 --- a/src/v3/server.rs +++ b/src/v3/server.rs @@ -100,6 +100,13 @@ where /// Mqtt::Handshake(HandshakeError::Timeout) error. /// /// By default, connect timeout is disabled. + pub fn connect_timeout(mut self, timeout: Seconds) -> Self { + self.connect_timeout = timeout; + self + } + + #[deprecated(since = "0.12.5")] + #[doc(hidden)] pub fn conenct_timeout(mut self, timeout: Seconds) -> Self { self.connect_timeout = timeout; self diff --git a/src/v5/selector.rs b/src/v5/selector.rs index 9f269a1..95f17e7 100644 --- a/src/v5/selector.rs +++ b/src/v5/selector.rs @@ -57,6 +57,13 @@ where /// Mqtt::Handshake(HandshakeError::Timeout) error. /// /// By default, connect timeout is disabled. + pub fn connect_timeout(mut self, timeout: Seconds) -> Self { + self.connect_timeout = timeout.into(); + self + } + + #[deprecated(since = "0.12.5")] + #[doc(hidden)] pub fn conenct_timeout(mut self, timeout: Seconds) -> Self { self.connect_timeout = timeout.into(); self diff --git a/src/v5/server.rs b/src/v5/server.rs index ec2019d..2569d2e 100644 --- a/src/v5/server.rs +++ b/src/v5/server.rs @@ -75,6 +75,13 @@ where /// Mqtt::Handshake(HandshakeError::Timeout) error. /// /// By default, connect timeout is disabled. + pub fn connect_timeout(mut self, timeout: Seconds) -> Self { + self.connect_timeout = timeout; + self + } + + #[deprecated(since = "0.12.5")] + #[doc(hidden)] pub fn conenct_timeout(mut self, timeout: Seconds) -> Self { self.connect_timeout = timeout; self