ws socket worker: replace an expect with error return

This commit is contained in:
Joakim Frostegård 2023-01-03 19:02:10 +01:00
parent 892b77ca61
commit 569e437f7b

View file

@ -432,7 +432,7 @@ async fn run_stream_agnostic_connection<
race(reader_handle, writer_handle)
.await
.expect("reader/writer task should not be closed")
.ok_or_else(|| anyhow::anyhow!("reader/writer task closed"))?
}
struct ConnectionReader<S> {