Clear input streams on audiostream disconnect
This commit is contained in:
@@ -92,7 +92,9 @@ namespace Discord.Audio
|
|||||||
await _connection.StartAsync().ConfigureAwait(false);
|
await _connection.StartAsync().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
public async Task StopAsync()
|
public async Task StopAsync()
|
||||||
=> await _connection.StopAsync().ConfigureAwait(false);
|
{
|
||||||
|
await _connection.StopAsync().ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
private async Task OnConnectingAsync()
|
private async Task OnConnectingAsync()
|
||||||
{
|
{
|
||||||
@@ -120,6 +122,8 @@ namespace Discord.Audio
|
|||||||
while (_heartbeatTimes.TryDequeue(out time)) { }
|
while (_heartbeatTimes.TryDequeue(out time)) { }
|
||||||
_lastMessageTime = 0;
|
_lastMessageTime = 0;
|
||||||
|
|
||||||
|
await ClearInputStreamsAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
await _audioLogger.DebugAsync("Sending Voice State").ConfigureAwait(false);
|
await _audioLogger.DebugAsync("Sending Voice State").ConfigureAwait(false);
|
||||||
await Discord.ApiClient.SendVoiceStateUpdateAsync(Guild.Id, null, false, false).ConfigureAwait(false);
|
await Discord.ApiClient.SendVoiceStateUpdateAsync(Guild.Id, null, false, false).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user