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 !WINDOWS_UWP
/// <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.
@@ -42,6 +43,13 @@ namespace MQTTnet.Client
/// This is not related to the credentials which are used for the MQTT protocol.
/// </summary>
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
}
}
@@ -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;