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

Use CloseCode::Abnormal in keepalive timeouts #109

Merged
merged 2 commits into from
Sep 4, 2024
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## v0.6.3

- Allow users to use tokio v2.4.0 in their projects. See [#106](https://github.com/gbaranski/ezsockets/pull/106).
- Return `CloseCode::Abnormal` from keepalive timeouts instead of `CloseCode::Normal`.
- Fix DDOS by honest clients when servers check capacity *after* clients connect.


Expand Down
2 changes: 1 addition & 1 deletion src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ async fn handle_heartbeat_sleep_elapsed(
tracing::info!("closing connection due to timeout");
let _ = sink
.send_raw(InRawMessage::new(RawMessage::Close(Some(CloseFrame {
code: CloseCode::Normal,
code: CloseCode::Abnormal,
reason: String::from("remote partner is inactive"),
}))))
.await;
Expand Down
Loading