mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-27 08:42:37 +08:00
Merge pull request #718 from PaulFake/patch-3
Fixed AsyncLock::WaitAsync cancellation bug
This commit is contained in:
@@ -23,7 +23,7 @@ namespace MQTTnet.Internal
|
|||||||
public Task<IDisposable> WaitAsync(CancellationToken cancellationToken)
|
public Task<IDisposable> WaitAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var task = _semaphore.WaitAsync(cancellationToken);
|
var task = _semaphore.WaitAsync(cancellationToken);
|
||||||
if (task.IsCompleted)
|
if (task.Status == TaskStatus.RanToCompletion)
|
||||||
{
|
{
|
||||||
return _releaser;
|
return _releaser;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user