Browse Source

Set UDP receive thread to background

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

+ 2
- 2
src/Discord.Net/WebSockets/Voice/VoiceWebSocket.cs 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...


Loading…
Cancel
Save