Browse Source

Dont create aggregate exceptions inside the Run function

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

+ 2
- 2
src/Discord.Net/DiscordWSClient.cs View File

@@ -289,9 +289,9 @@ namespace Discord
{
try
{
asyncAction().Wait();
asyncAction().GetAwaiter().GetResult(); //Avoids creating AggregateExceptions
}
catch (AggregateException ex) when (ex.InnerException is TaskCanceledException) { }
catch (TaskCanceledException) { }
_disconnectedEvent.WaitOne();
}
/// <summary> Blocking call that will not return until client has been stopped. This is mainly intended for use in console applications. </summary>


Loading…
Cancel
Save