gio-echo: explicitly close the stream

Not doing so means we rudely disconnect from the socket without clong out our
websocket stream
This commit is contained in:
Carlos Martín Nieto 2023-03-21 19:25:41 +01:00 committed by Sebastian Dröge
parent f8e6c3a8c3
commit fe1c2aeb95
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,8 @@ async fn run() -> Result<(), Box<dyn std::error::Error>> {
println!("Received: {:?}", msg);
ws_stream.close(None).await.expect("error sending close");
Ok(())
}