mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-22 04:43:04 +08:00
Skip adding default message expiry interval.
This commit is contained in:
@@ -84,6 +84,11 @@ namespace MQTTnet.Formatter.V5
|
|||||||
{
|
{
|
||||||
// If absent, the Application Message does not expire.
|
// If absent, the Application Message does not expire.
|
||||||
// This library uses 0 to indicate no expiration.
|
// This library uses 0 to indicate no expiration.
|
||||||
|
if (value == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
WriteAsFourByteInteger(MqttPropertyId.MessageExpiryInterval, value);
|
WriteAsFourByteInteger(MqttPropertyId.MessageExpiryInterval, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user