Skip to content

Commit

Permalink
Merge pull request #2341 from dusk-network/rues-close-ws
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia authored Sep 10, 2024
2 parents db65642 + fa1a517 commit e9a07a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rusk/src/lib/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,12 @@ async fn handle_stream_rues<H: HandleRequest>(

loop {
tokio::select! {
recv = stream.next() => {
if let Some(Ok(Message::Close(msg))) = recv {
let _ = stream.close(msg).await;
break;
}
}
_ = shutdown.recv() => {
let _ = stream.close(Some(CloseFrame {
code: CloseCode::Away,
Expand Down

0 comments on commit e9a07a3

Please sign in to comment.