diff --git a/Source/MQTTnet/Client/Options/MqttClientWebSocketOptions.cs b/Source/MQTTnet/Client/Options/MqttClientWebSocketOptions.cs
index 0b386675..d35f7f00 100644
--- a/Source/MQTTnet/Client/Options/MqttClientWebSocketOptions.cs
+++ b/Source/MQTTnet/Client/Options/MqttClientWebSocketOptions.cs
@@ -31,6 +31,7 @@ namespace MQTTnet.Client
}
#if !NETSTANDARD1_3
+#if !WINDOWS_UWP
///
/// Gets or sets the keep alive interval for the Web Socket connection.
/// This is not related to the keep alive interval for the MQTT protocol.
@@ -42,6 +43,13 @@ namespace MQTTnet.Client
/// This is not related to the credentials which are used for the MQTT protocol.
///
public bool UseDefaultCredentials { get; set; }
+#else
+ ///
+ /// Gets or sets the keep alive interval for the Web Socket connection.
+ /// This is not related to the keep alive interval for the MQTT protocol.
+ ///
+ public TimeSpan KeepAliveInterval { get; set; } = TimeSpan.FromSeconds(30);
+#endif
#endif
}
}
\ No newline at end of file
diff --git a/Source/MQTTnet/Implementations/MqttWebSocketChannel.cs b/Source/MQTTnet/Implementations/MqttWebSocketChannel.cs
index 900b292b..6ee5b451 100644
--- a/Source/MQTTnet/Implementations/MqttWebSocketChannel.cs
+++ b/Source/MQTTnet/Implementations/MqttWebSocketChannel.cs
@@ -218,9 +218,11 @@ namespace MQTTnet.Implementations
#endif
}
}
-
+
#if !NETSTANDARD1_3
+#if !WINDOWS_UWP
clientWebSocket.Options.UseDefaultCredentials = _options.UseDefaultCredentials;
+#endif
clientWebSocket.Options.KeepAliveInterval = _options.KeepAliveInterval;
#endif
clientWebSocket.Options.Credentials = _options.Credentials;