Only throw an exception if a TaskManager cancel was unexpected

This commit is contained in:
RogueException
2016-02-09 19:21:14 -04:00
parent 4b4df67287
commit fa0c7c3f40

View File

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