gio-echo: explicitly close the stream

Not doing so means we rudely disconnect from the socket without clong out our
websocket stream
pull/115/head
Carlos Martín Nieto 2 years ago committed by Sebastian Dröge
parent f8e6c3a8c3
commit fe1c2aeb95
  1. 2
      examples/gio-echo.rs

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

Loading…
Cancel
Save