Skip to content

Commit

Permalink
Rust: Fix worker error handling
Browse files Browse the repository at this point in the history
Properly retrieve the error reason.
  • Loading branch information
jmillan committed Oct 23, 2023
1 parent bf99b96 commit 6e1684c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rust/src/worker/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ impl Channel {
.remove(&response.id().unwrap());
if let Some(mut sender) = sender {
// Request did not succeed.
if let Ok(Some(error)) = response.error() {
if let Ok(Some(reason)) = response.reason() {
let _ = sender.send(Err(ResponseError {
reason: error.to_string(),
reason: reason.to_string(),
}));
}
// Request succeeded.
Expand Down
2 changes: 0 additions & 2 deletions rust/tests/integration/pipe_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,6 @@ fn pipe_to_router_succeeds_with_video() {
}

#[test]
#[ignore]
fn pipe_to_router_fails_if_both_routers_belong_to_the_same_worker() {
future::block_on(async move {
let (worker1, _worker2, router1, _router2, transport1, _transport2) = init().await;
Expand Down Expand Up @@ -945,7 +944,6 @@ fn consume_for_pipe_producer_succeeds() {
}

#[test]
#[ignore]
fn producer_pause_resume_are_transmitted_to_pipe_consumer() {
future::block_on(async move {
let (_worker1, _worker2, router1, router2, transport1, transport2) = init().await;
Expand Down

0 comments on commit 6e1684c

Please sign in to comment.