diff --git a/Source/MQTTnet/Client/Options/IMqttClientOptions.cs b/Source/MQTTnet/Client/Options/IMqttClientOptions.cs
index 01e64f0f..565bf1ab 100644
--- a/Source/MQTTnet/Client/Options/IMqttClientOptions.cs
+++ b/Source/MQTTnet/Client/Options/IMqttClientOptions.cs
@@ -79,13 +79,13 @@ namespace MQTTnet.Client
/// Gets the request problem information.
/// Hint: MQTT 5 feature only.
///
- bool? RequestProblemInformation { get; }
+ bool RequestProblemInformation { get; }
///
/// Gets the request response information.
/// Hint: MQTT 5 feature only.
///
- bool? RequestResponseInformation { get; }
+ bool RequestResponseInformation { get; }
///
/// Gets the session expiry interval.
@@ -97,7 +97,7 @@ namespace MQTTnet.Client
/// Gets the topic alias maximum.
/// This gives the maximum length of the topic alias.
///
- ushort? TopicAliasMaximum { get; }
+ ushort TopicAliasMaximum { get; }
///
/// Gets or sets the user properties.
diff --git a/Source/MQTTnet/Client/Options/MqttClientOptions.cs b/Source/MQTTnet/Client/Options/MqttClientOptions.cs
index 2b388edf..31286cd8 100644
--- a/Source/MQTTnet/Client/Options/MqttClientOptions.cs
+++ b/Source/MQTTnet/Client/Options/MqttClientOptions.cs
@@ -79,13 +79,13 @@ namespace MQTTnet.Client
/// Gets or sets the request problem information.
/// Hint: MQTT 5 feature only.
///
- public bool? RequestProblemInformation { get; set; }
+ public bool RequestProblemInformation { get; set; } = true;
///
/// Gets or sets the request response information.
/// Hint: MQTT 5 feature only.
///
- public bool? RequestResponseInformation { get; set; }
+ public bool RequestResponseInformation { get; set; }
///
/// Gets or sets the session expiry interval.
@@ -97,7 +97,7 @@ namespace MQTTnet.Client
/// Gets or sets the topic alias maximum.
/// This gives the maximum length of the topic alias.
///
- public ushort? TopicAliasMaximum { get; set; }
+ public ushort TopicAliasMaximum { get; set; }
///
/// Gets or sets the user properties.
diff --git a/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs b/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs
index 3016cd51..37d9fdf7 100644
--- a/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs
+++ b/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs
@@ -82,7 +82,7 @@ namespace MQTTnet.Client
return this;
}
- public MqttClientOptionsBuilder WithTopicAliasMaximum(ushort? topicAliasMaximum)
+ public MqttClientOptionsBuilder WithTopicAliasMaximum(ushort topicAliasMaximum)
{
_options.TopicAliasMaximum = topicAliasMaximum;
return this;
@@ -100,13 +100,13 @@ namespace MQTTnet.Client
return this;
}
- public MqttClientOptionsBuilder WithRequestProblemInformation(bool? requestProblemInformation = true)
+ public MqttClientOptionsBuilder WithRequestProblemInformation(bool requestProblemInformation = true)
{
_options.RequestProblemInformation = requestProblemInformation;
return this;
}
- public MqttClientOptionsBuilder WithRequestResponseInformation(bool? requestResponseInformation = true)
+ public MqttClientOptionsBuilder WithRequestResponseInformation(bool requestResponseInformation = true)
{
_options.RequestResponseInformation = requestResponseInformation;
return this;
diff --git a/Source/MQTTnet/Packets/MqttConnectPacketProperties.cs b/Source/MQTTnet/Packets/MqttConnectPacketProperties.cs
index a1187480..e858b309 100644
--- a/Source/MQTTnet/Packets/MqttConnectPacketProperties.cs
+++ b/Source/MQTTnet/Packets/MqttConnectPacketProperties.cs
@@ -12,9 +12,9 @@ namespace MQTTnet.Packets
public byte[] AuthenticationData { get; set; }
- public bool? RequestProblemInformation { get; set; }
+ public bool RequestProblemInformation { get; set; } = true;
- public bool? RequestResponseInformation { get; set; }
+ public bool RequestResponseInformation { get; set; }
public ushort? ReceiveMaximum { get; set; }