Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set default network timeout as Duration::MAX instead of zero. #949

Merged
merged 4 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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