Browse Source

Only throw an exception if a TaskManager cancel was unexpected

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

+ 4
- 1
src/Discord.Net/TaskManager.cs View File

@@ -162,7 +162,10 @@ namespace Discord
public void ThrowException()
{
using (_lock.Lock())
_stopReason?.Throw();
{
if (!WasStopExpected)
_stopReason?.Throw();
}
}
public void ClearException()
{


Loading…
Cancel
Save