Browse Source

Use VoiceKeepAlives

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

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

@@ -90,7 +90,9 @@ namespace Discord.Net.WebSockets
{ {
try try
{ {
await Start().ConfigureAwait(false);
//This check is needed in case we start a reconnect before the initial login completes
if (_state != (int)WebSocketState.Disconnected)
await Start().ConfigureAwait(false);
break; break;
} }
catch (OperationCanceledException) { throw; } catch (OperationCanceledException) { throw; }
@@ -533,7 +535,7 @@ namespace Discord.Net.WebSockets


protected override object GetKeepAlive() protected override object GetKeepAlive()
{ {
return new KeepAliveCommand();
return new VoiceKeepAliveCommand();
} }


public void WaitForQueue() public void WaitForQueue()


Loading…
Cancel
Save