Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(gloo-net): remove bug-abling EventSource Clone implementation #417

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@

## `net`

### Version "0.6.0"

- Remove `Clone` implementation for `EventSource`.
Due to bug triggering unwanted behavior upon clone, when dropped instances would disconnect all others.
See Discussion (#409)

### Version "0.5.0"

- Implement `futures_io::AsyncWrite` and `futures_io::AsyncRead` on `WebSocket`.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gloo-console = { version = "0.3", path = "crates/console", optional = true }
gloo-utils = { version = "0.2", path = "crates/utils", optional = true }
gloo-history = { version = "0.2", path = "crates/history", optional = true }
gloo-worker = { version = "0.5", path = "crates/worker", optional = true }
gloo-net = { version = "0.5", path = "crates/net", optional = true }
gloo-net = { version = "0.6", path = "crates/net", optional = true }

[features]
default = [
Expand Down
2 changes: 1 addition & 1 deletion crates/net/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gloo-net"
version = "0.5.0"
version = "0.6.0"
authors = [
"Rust and WebAssembly Working Group",
"Muhammad Hamza <muhammadhamza1311@gmail.com>",
Expand Down
1 change: 0 additions & 1 deletion crates/net/src/eventsource/futures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ use web_sys::MessageEvent;

/// Wrapper around browser's EventSource API. Dropping
/// this will close the underlying event source.
#[derive(Clone)]
pub struct EventSource {
es: web_sys::EventSource,
}
Expand Down