Skip to content
Merged
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
14 changes: 6 additions & 8 deletions turn/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,12 @@ impl RelayConnObserver for ClientInternal {
}

// wait_for_result waits for the transaction result
if let Some(mut result_ch_rx) = result_ch_rx {
match result_ch_rx.recv().await {
Some(tr) => Ok(tr),
None => Err(Error::ErrTransactionClosed),
}
} else {
Err(Error::ErrWaitForResultOnNonResultTransaction)
}
let mut result_ch_rx = result_ch_rx.ok_or(Error::ErrWaitForResultOnNonResultTransaction)?;
let tr = result_ch_rx
.recv()
.await
.ok_or(Error::ErrTransactionClosed)?;
Ok(tr)
}
}

Expand Down
Loading