From 87d7b140da162ad0901616fb62f1f2631c9b39a5 Mon Sep 17 00:00:00 2001 From: fwcd Date: Thu, 18 Jul 2024 01:08:53 +0200 Subject: [PATCH] Fix close implementation --- lighthouse-client/src/lighthouse.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lighthouse-client/src/lighthouse.rs b/lighthouse-client/src/lighthouse.rs index 117e775..4aeafd4 100644 --- a/lighthouse-client/src/lighthouse.rs +++ b/lighthouse-client/src/lighthouse.rs @@ -303,7 +303,7 @@ impl Lighthouse /// Closes the WebSocket connection gracefully with a close message. While /// the server will usually also handle abruptly closed connections /// properly, it is recommended to always close the [``Lighthouse``]. - pub async fn close(&self) -> Result<()> { - Ok(self.ws_sink.lock().await.close().await?) + pub async fn close(&mut self) -> Result<()> { + Ok(self.ws_sink.close().await?) } }