mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-17 01:33:03 +08:00
Refactor empty payload detection for retained messages.
This commit is contained in:
@@ -61,7 +61,7 @@ namespace MQTTnet.Server
|
||||
using (await _messagesLock.WaitAsync().ConfigureAwait(false))
|
||||
{
|
||||
var saveIsRequired = false;
|
||||
var hasPayload = applicationMessage.Payload?.Any() == true;
|
||||
var hasPayload = applicationMessage.Payload != null && applicationMessage.Payload.Length > 0;
|
||||
|
||||
if (!hasPayload)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user