mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 17:23:04 +08:00
Fix Unit Tests.
This commit is contained in:
@@ -763,6 +763,8 @@ namespace MQTTnet.Client
|
||||
|
||||
bool DisconnectIsPending()
|
||||
{
|
||||
// This will read the _isDisconnectPending and set it to "1" afterwards regardless of the value.
|
||||
// So the first caller will get a "false" and all subsequent ones will get "true".
|
||||
return Interlocked.CompareExchange(ref _isDisconnectPending, 1, 0) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user