mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 18:43:10 +08:00
Add UnitTests.
This commit is contained in:
@@ -61,8 +61,9 @@ namespace MQTTnet.Server
|
||||
using (await _messagesLock.WaitAsync().ConfigureAwait(false))
|
||||
{
|
||||
var saveIsRequired = false;
|
||||
var hasPayload = applicationMessage.Payload?.Any() == true;
|
||||
|
||||
if (applicationMessage.Payload?.Any() != true)
|
||||
if (!hasPayload)
|
||||
{
|
||||
saveIsRequired = _messages.Remove(applicationMessage.Topic);
|
||||
_logger.Verbose("Client '{0}' cleared retained message for topic '{1}'.", clientId, applicationMessage.Topic);
|
||||
|
||||
Reference in New Issue
Block a user