Skip to content

Commit

Permalink
Solved 4003 Authentication Error (Race Condition) (#1093)
Browse files Browse the repository at this point in the history
* Solved 4003 Authentication Error (Race Condition)

* Set static interval & removed hello case
  • Loading branch information
ComputerMaster1st authored and foxbot committed Jun 23, 2018
1 parent aff4512 commit 322d46e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Discord.Net.WebSocket/Audio/AudioClient.cs
Expand Up @@ -216,14 +216,6 @@ private async Task ProcessMessageAsync(VoiceOpCode opCode, object payload)
{
switch (opCode)
{
case VoiceOpCode.Hello:
{
await _audioLogger.DebugAsync("Received Hello").ConfigureAwait(false);
var data = (payload as JToken).ToObject<HelloEvent>(_serializer);

_heartbeatTask = RunHeartbeatAsync(data.HeartbeatInterval, _connection.CancelToken);
}
break;
case VoiceOpCode.Ready:
{
await _audioLogger.DebugAsync("Received Ready").ConfigureAwait(false);
Expand All @@ -236,6 +228,9 @@ private async Task ProcessMessageAsync(VoiceOpCode opCode, object payload)

ApiClient.SetUdpEndpoint(data.Ip, data.Port);
await ApiClient.SendDiscoveryAsync(_ssrc).ConfigureAwait(false);


_heartbeatTask = RunHeartbeatAsync(41250, _connection.CancelToken);
}
break;
case VoiceOpCode.SessionDescription:
Expand Down

0 comments on commit 322d46e

Please sign in to comment.