Fix Unit Tests.

This commit is contained in:
Christian
2020-11-15 14:21:11 +01:00
parent 02ab0e4903
commit 483c2d8b10
+2
View File
@@ -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;
}
}