Skip to content

Commit

Permalink
fix(rumqttd): set default network timeout as Duration::MAX instead …
Browse files Browse the repository at this point in the history
…of zero. (#949)
  • Loading branch information
Ddystopia authored Feb 28, 2025
1 parent a76d2a0 commit cb89fcf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions rumqttd/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- MQTT keep alive interval
- Change default network keep alive interval from `Duration::ZERO` to `Duration::MAX`.
- record client id for remote link's span
- session present flag in connack
- Make write method return the number of bytes written correctly everywhere
Expand Down
5 changes: 4 additions & 1 deletion rumqttd/src/link/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ impl<P: Protocol> Network<P> {
write: BytesMut::with_capacity(10 * 1024),
max_incoming_size,
max_connection_buffer_len,
keepalive: Duration::ZERO,
// Overwritten by keepalive value in connect packet, otherwise we
// would wait indefinitely until we get a packet / network error
// when we call read.
keepalive: Duration::MAX,
protocol,
}
}
Expand Down

0 comments on commit cb89fcf

Please # to comment.