From 101898695eee1a692c1cf300ac4ed0c623afeed1 Mon Sep 17 00:00:00 2001 From: simonthum Date: Sun, 13 Aug 2023 18:06:16 +0200 Subject: [PATCH] Add will message expiry interval to builder (#1804) This was missing from builder but not regular options. --- Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs b/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs index e6bc39681..805eda661 100644 --- a/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs +++ b/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs @@ -478,6 +478,12 @@ public MqttClientOptionsBuilder WithWillRetain(bool willRetain = true) return this; } + public MqttClientOptionsBuilder WithWillMessageExpiryInterval(uint willMessageExpiryInterval) + { + _options.WillMessageExpiryInterval = willMessageExpiryInterval; + return this; + } + public MqttClientOptionsBuilder WithWillTopic(string willTopic) { _options.WillTopic = willTopic;