From 54761c4bd0482c7fcbe978bede00d1d439740ba9 Mon Sep 17 00:00:00 2001 From: whs Date: Tue, 4 Jun 2024 20:31:05 +0800 Subject: [PATCH] Fix ws close --- src/transports/ws.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/transports/ws.rs b/src/transports/ws.rs index 1e6cd19e..bfe74a6b 100644 --- a/src/transports/ws.rs +++ b/src/transports/ws.rs @@ -236,7 +236,9 @@ impl WsServerTask { log::warn!("Unsubscribing from non-existent subscription with id {:?}", id); } } - None => {} + None => { + sender.close().await.expect("Fail to close WS") + } }, res = receiver.next() => match res { Some(Ok(data)) => {