Skip to content

Commit f4dc972

Browse files
committed
Fixing keepalive storage
1 parent befcf7d commit f4dc972

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Version 0.5.1 was published on 2021-12-07
1313
## Fixed
1414
* Fixed an issue where the keepalive interval could not be set properly. See
1515
[#69](https://github.com/quartiq/minimq/issues/69).
16+
* Fixed an issue where the keepalive interval was not set properly. See
17+
[#70](https://github.com/quartiq/minimq/issues/70).
1618

1719
# Version [0.5.0]
1820
Version 0.5.0 was published on 2021-12-06

src/session_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl<Clock: embedded_time::Clock, const MSG_SIZE: usize, const MSG_COUNT: usize>
6060
/// # Note
6161
/// If no keep-alive interval is specified, zero is returned.
6262
pub fn keepalive_interval(&self) -> u16 {
63-
(self.keep_alive_interval.unwrap_or(0.milliseconds()).0 * 1000) as u16
63+
(self.keep_alive_interval.unwrap_or(0.milliseconds()).0 / 1000) as u16
6464
}
6565

6666
/// Update the keep-alive interval.

0 commit comments

Comments
 (0)