From fe1c2aeb95e56733011617c28b608845de2af0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Tue, 21 Mar 2023 19:25:41 +0100 Subject: [PATCH] gio-echo: explicitly close the stream Not doing so means we rudely disconnect from the socket without clong out our websocket stream --- examples/gio-echo.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/gio-echo.rs b/examples/gio-echo.rs index b5c0370..95e17db 100644 --- a/examples/gio-echo.rs +++ b/examples/gio-echo.rs @@ -15,6 +15,8 @@ async fn run() -> Result<(), Box> { println!("Received: {:?}", msg); + ws_stream.close(None).await.expect("error sending close"); + Ok(()) }