Browse Source

Ignore UDP errors in VoiceSocket's outgoing thread, and push them to the log.

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

+ 8
- 1
src/Discord.Net/Net/WebSockets/VoiceWebSocket.cs View File

@@ -388,7 +388,14 @@ namespace Discord.Net.WebSockets
{
if (hasFrame)
{
_udp.Send(voicePacket, rtpPacketLength);
try
{
_udp.Send(voicePacket, rtpPacketLength);
}
catch (SocketException ex)
{
RaiseOnLog(LogMessageSeverity.Error, "Failed to send UDP packet.", ex);
}
hasFrame = false;
}
nextTicks += ticksPerFrame;


Loading…
Cancel
Save