From 90bb365da8abede9508871ed2cfca6d7a1fe37b3 Mon Sep 17 00:00:00 2001 From: RogueException Date: Sun, 18 Oct 2015 18:05:26 -0300 Subject: [PATCH] Throw exception if data is pushed after a voice client disconnected. --- src/Discord.Net/WebSockets/Voice/VoiceBuffer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net/WebSockets/Voice/VoiceBuffer.cs b/src/Discord.Net/WebSockets/Voice/VoiceBuffer.cs index b3f04281d..4bc54a4ce 100644 --- a/src/Discord.Net/WebSockets/Voice/VoiceBuffer.cs +++ b/src/Discord.Net/WebSockets/Voice/VoiceBuffer.cs @@ -50,7 +50,7 @@ namespace Discord.WebSockets.Voice { _notOverflowEvent.Wait(cancelToken); } - catch (OperationCanceledException) { return; } + catch (OperationCanceledException) { throw new InvalidOperationException("Client is not connected."); } } if (i == wholeFrames)