Fix build

This commit is contained in:
Christian
2023-05-14 09:14:37 +02:00
parent 7601d11a7a
commit 2cdad6622a
2 changed files with 11 additions and 1 deletions
@@ -31,6 +31,7 @@ namespace MQTTnet.Client
} }
#if !NETSTANDARD1_3 #if !NETSTANDARD1_3
#if !WINDOWS_UWP
/// <summary> /// <summary>
/// Gets or sets the keep alive interval for the Web Socket connection. /// 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. /// 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. /// This is not related to the credentials which are used for the MQTT protocol.
/// </summary> /// </summary>
public bool UseDefaultCredentials { get; set; } public bool UseDefaultCredentials { get; set; }
#else
/// <summary>
/// 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.
/// </summary>
public TimeSpan KeepAliveInterval { get; set; } = TimeSpan.FromSeconds(30);
#endif
#endif #endif
} }
} }
@@ -220,7 +220,9 @@ namespace MQTTnet.Implementations
} }
#if !NETSTANDARD1_3 #if !NETSTANDARD1_3
#if !WINDOWS_UWP
clientWebSocket.Options.UseDefaultCredentials = _options.UseDefaultCredentials; clientWebSocket.Options.UseDefaultCredentials = _options.UseDefaultCredentials;
#endif
clientWebSocket.Options.KeepAliveInterval = _options.KeepAliveInterval; clientWebSocket.Options.KeepAliveInterval = _options.KeepAliveInterval;
#endif #endif
clientWebSocket.Options.Credentials = _options.Credentials; clientWebSocket.Options.Credentials = _options.Credentials;