Skip to content

Commit

Permalink
use CloseCode::Abnormal instead of CloseCode::Normal in keepalive tim…
Browse files Browse the repository at this point in the history
…eouts
  • Loading branch information
UkoeHB committed Sep 4, 2024
1 parent fde643a commit ff7c3a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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`.


## v0.6.2
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

0 comments on commit ff7c3a4

Please sign in to comment.