Skip to content

Commit

Permalink
Merge branch 'main' into feat-extensions-rework
Browse files Browse the repository at this point in the history
  • Loading branch information
Totodore authored May 10, 2024
2 parents 5888b37 + 9415e05 commit 1805c10
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
# 0.13.1

## engineioxide
* fix: issue #320. Remove unnecessary panic when receiving unexpected websocket messages. This might happen with some specific socket.io clients.

# 0.13.0

## socketioxide
* fix: issue #311, the `delete_ns` fn was deadlocking the entire server when called from inside a `disconnect_handler`.
* feat: the `delete_ns` is now gracefully closing the adapter as well as all its sockets before being removed.
* feat: the API use `Bytes` rather than `Vec<u8>` to represent binary payloads. This allow to avoid unnecessary copies.
* deps: use `futures-util` and `futures-core` rather than the whole `futures` crate.

## engineioxide
* feat: the API use `Bytes/Str` rather than `Vec<u8>` and `String` to represent payloads. This allow to avoid unnecessary copies.
* deps: use `futures-util` and `futures-core` rather than the whole `futures` crate.

# 0.12.0
**MSRV**: Minimum supported Rust version is now 1.75.

# socketioxide
## socketioxide
* **(Breaking)**: Introduction of [connect middlewares](https://docs.rs/socketioxide/latest/socketioxide/#middlewares). It allows to execute code before the connection to the namespace is established. It is useful to check the request, to authenticate the user, to log the connection etc. It is possible to add multiple middlewares and to chain them.
* The `SocketRef` extractor is now `Clone`. Be careful to drop clones when the socket is disconnected to avoid any memory leak.

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace.package]
version = "0.12.0"
version = "0.13.1"
edition = "2021"
rust-version = "1.75.0"
authors = ["Théodore Prévot <"]
Expand Down
6 changes: 5 additions & 1 deletion engineioxide/src/transport/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ where
Ok(())
}
Message::Close(_) => break,
_ => panic!("[sid={}] unexpected ws message", socket.id),
_ => {
#[cfg(feature = "tracing")]
tracing::debug!("[sid={}] unexpected ws message", socket.id);
Ok(())
}
}?
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion socketioxide/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ readme = "../README.md"

[dependencies]
bytes.workspace = true
engineioxide = { path = "../engineioxide", version = "0.12.0" }
engineioxide = { path = "../engineioxide", version = "0.13.1" }
futures-core.workspace = true
futures-util.workspace = true
tokio = { workspace = true, features = ["rt", "time"] }
Expand Down

0 comments on commit 1805c10

Please sign in to comment.