Set UDP receive thread to background

This commit is contained in:
RogueException
2015-10-12 00:37:09 -03:00
parent f25d35150d
commit 3baedb1862

View File

@@ -134,12 +134,12 @@ namespace Discord.WebSockets.Voice
#endif
}
//This thread is required to establish a connection even if we're outgoing only
#if USE_THREAD
//This thread is required to establish a connection even if we're outgoing only
if ((_client.Config.VoiceMode & DiscordVoiceMode.Incoming) != 0)
{
_receiveThread = new Thread(new ThreadStart(() => ReceiveVoiceAsync(_cancelToken)));
_sendThread.IsBackground = true;
_receiveThread.IsBackground = true;
_receiveThread.Start();
}
else //Dont make an OS thread if we only want to capture one packet...