Skip to content

Commit 08d83b4

Browse files
committed
Make sure to propagate the exit reason returned from GenServer::init.
1 parent 3a51ea4 commit 08d83b4

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
### Fixed
88

9+
# 0.1.37
10+
11+
### Fixed
12+
- Properly propagate exit reason returned from `GenServer::init`.
13+
914
# 0.1.36
1015

1116
### Changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ tracing = { version = "0.1", default-features = false, features = ["std"] }
3333
tracing-subscriber = "0.3"
3434
dashmap = "6.0.1"
3535

36-
hydra-macros = { version = "0.1.36", path = "./hydra-macros" }
37-
hydra = { version = "0.1.36", path = "./hydra", default-features = false }
36+
hydra-macros = { version = "0.1.37", path = "./hydra-macros" }
37+
hydra = { version = "0.1.37", path = "./hydra", default-features = false }
3838

3939
[profile.release]
4040
lto = "fat"

hydra-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hydra-macros"
3-
version = "0.1.36"
3+
version = "0.1.37"
44
edition = "2021"
55
license.workspace = true
66
repository.workspace = true

hydra-websockets/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hydra-websockets"
3-
version = "0.1.36"
3+
version = "0.1.37"
44
edition = "2021"
55
readme = "./README.md"
66
license.workspace = true

hydra/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hydra"
3-
version = "0.1.36"
3+
version = "0.1.37"
44
edition = "2021"
55
readme.workspace = true
66
license.workspace = true

hydra/src/gen_server.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,14 +386,14 @@ async fn start_gen_server<T: GenServer>(
386386
tx.send(Ok(())).expect("Failed to notify parent process!");
387387
}
388388
Ok(Err(reason)) => {
389-
tx.send(Err(reason))
389+
tx.send(Err(reason.clone()))
390390
.expect("Failed to notify parent process!");
391-
return;
391+
return Process::exit(Process::current(), reason);
392392
}
393393
Err(_) => {
394394
tx.send(Err(ExitReason::from("timeout")))
395395
.expect("Failed to notify parent process!");
396-
return;
396+
return Process::exit(Process::current(), ExitReason::from("timeout"));
397397
}
398398
}
399399

0 commit comments

Comments
 (0)