Skip to content

Commit

Permalink
ignore front-end receiver close on process_response
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
  • Loading branch information
gregdhill committed Mar 10, 2021
1 parent cf2a5a7 commit 0ee62c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ws-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ fn process_response(
let response = response.try_into().map_err(Error::Request);
match send_back_oneshot.map(|tx| tx.send(response)) {
Some(Err(Err(e))) => Err(e),
Some(Err(Ok(_))) => Err(Error::Custom("Frontend channel closed".into())),
// ignore error on channel close
Some(Err(Ok(_))) => Ok(None),
Some(Ok(_)) => Ok(None),
None => Ok(None),
}
Expand Down

0 comments on commit 0ee62c3

Please sign in to comment.