From c96eb0279e8d3092988e8d5c49e132d243ddbae4 Mon Sep 17 00:00:00 2001 From: Eskil Date: Thu, 15 Oct 2020 22:22:43 +0000 Subject: Update state properly when disconnecting from server and on user_state packet --- mumd/src/audio.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mumd/src/audio.rs') diff --git a/mumd/src/audio.rs b/mumd/src/audio.rs index 1445415..edc2f7f 100644 --- a/mumd/src/audio.rs +++ b/mumd/src/audio.rs @@ -191,6 +191,10 @@ impl Audio { pub fn take_receiver(&mut self) -> Option> { self.input_channel_receiver.take() } + + pub fn clear_clients(&mut self) { + self.client_streams.lock().unwrap().clear(); + } } impl ClientStream { -- cgit v1.2.1