Skip to content

Commit

Permalink
fix: Properly rethrow exceptions in SocketGuild audio client
Browse files Browse the repository at this point in the history
  • Loading branch information
foxbot committed May 27, 2018
1 parent c0c565f commit adf4da1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,10 @@ internal async Task<IAudioClient> ConnectAudioAsync(ulong channelId, bool selfDe

await Discord.ApiClient.SendVoiceStateUpdateAsync(Id, channelId, selfDeaf, selfMute).ConfigureAwait(false);
}
catch (Exception)
catch (Exception e)
{
await DisconnectAudioInternalAsync().ConfigureAwait(false);
throw;
throw e;
}
finally
{
Expand All @@ -566,10 +566,10 @@ internal async Task<IAudioClient> ConnectAudioAsync(ulong channelId, bool selfDe
throw new TimeoutException();
return await promise.Task.ConfigureAwait(false);
}
catch (Exception)
catch (Exception e)
{
await DisconnectAudioAsync().ConfigureAwait(false);
throw;
throw e;
}
}

Expand Down

0 comments on commit adf4da1

Please sign in to comment.