mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-11-03 12:53:01 +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))
|
using (await _messagesLock.WaitAsync().ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
var saveIsRequired = false;
|
var saveIsRequired = false;
|
||||||
var hasPayload = applicationMessage.Payload?.Any() == true;
|
var hasPayload = applicationMessage.Payload != null && applicationMessage.Payload.Length > 0;
|
||||||
|
|
||||||
if (!hasPayload)
|
if (!hasPayload)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user