Browse Source

Only join threads if they were made in the first place

tags/docs-0.9
RogueException 9 years ago
parent
commit
f25d35150d
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/Discord.Net/WebSockets/Voice/VoiceWebSocket.cs

+ 4
- 2
src/Discord.Net/WebSockets/Voice/VoiceWebSocket.cs View File

@@ -167,8 +167,10 @@ namespace Discord.WebSockets.Voice
protected override Task Cleanup() protected override Task Cleanup()
{ {
#if USE_THREAD #if USE_THREAD
_sendThread.Join();
_receiveThread.Join();
if (_sendThread != null)
_sendThread.Join();
if (_receiveThread != null)
_receiveThread.Join();
_sendThread = null; _sendThread = null;
_receiveThread = null; _receiveThread = null;
#endif #endif


Loading…
Cancel
Save