Skip to content

Commit

Permalink
Actually return the GenServer::init result.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtzxporter committed Jan 7, 2025
1 parent 08d83b4 commit 1e011ea
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

### Fixed

# 0.1.38

### Fixed
- Return if process exited from `GenServer::init`.

# 0.1.37

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ tracing = { version = "0.1", default-features = false, features = ["std"] }
tracing-subscriber = "0.3"
dashmap = "6.0.1"

hydra-macros = { version = "0.1.37", path = "./hydra-macros" }
hydra = { version = "0.1.37", path = "./hydra", default-features = false }
hydra-macros = { version = "0.1.38", path = "./hydra-macros" }
hydra = { version = "0.1.38", path = "./hydra", default-features = false }

[profile.release]
lto = "fat"
Expand Down
2 changes: 1 addition & 1 deletion hydra-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hydra-macros"
version = "0.1.37"
version = "0.1.38"
edition = "2021"
license.workspace = true
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion hydra-websockets/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hydra-websockets"
version = "0.1.37"
version = "0.1.38"
edition = "2021"
readme = "./README.md"
license.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion hydra/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hydra"
version = "0.1.37"
version = "0.1.38"
edition = "2021"
readme.workspace = true
license.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions hydra/src/gen_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ pub trait GenServer: Sized + Send + 'static {
/// Starts a [GenServer] process linked to the current process.
fn start_link(
self,

options: GenServerOptions,
) -> impl Future<Output = Result<Pid, ExitReason>> + Send {
async { start_gen_server(self, options, true).await }
Expand Down Expand Up @@ -460,6 +459,6 @@ async fn start_gen_server<T: GenServer>(
};

rx.await
.map_err(|_| ExitReason::from("unknown"))?
.map(|_| pid)
.map_err(|_| ExitReason::from("unknown"))
}

0 comments on commit 1e011ea

Please sign in to comment.