Only throw an exception if a TaskManager cancel was unexpected
This commit is contained in:
@@ -162,8 +162,11 @@ namespace Discord
|
|||||||
public void ThrowException()
|
public void ThrowException()
|
||||||
{
|
{
|
||||||
using (_lock.Lock())
|
using (_lock.Lock())
|
||||||
|
{
|
||||||
|
if (!WasStopExpected)
|
||||||
_stopReason?.Throw();
|
_stopReason?.Throw();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public void ClearException()
|
public void ClearException()
|
||||||
{
|
{
|
||||||
using (_lock.Lock())
|
using (_lock.Lock())
|
||||||
|
|||||||
Reference in New Issue
Block a user