Skip to content

Commit 77e39d6

Browse files
committed
feat!(binding_mqtt): remove discoveryTimeout config parameter
1 parent 96f76e4 commit 77e39d6

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

lib/src/binding_mqtt/constants.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const mqttContextUri = "http://www.example.org/mqtt-binding#";
3232
/// The default prefix used in MQTT-related compact URIs (CURIEs) in TDs.
3333
const defaultMqttPrefix = "mqv";
3434

35-
/// Default timeout length used for reading properties and discovering TDs.
36-
const defaultTimeout = Duration(seconds: 10);
35+
/// Default timeout length used for reading properties.
36+
const defaultReadTimeout = Duration(seconds: 10);
3737

3838
/// Default duration MQTT connections are kept alive in seconds.
3939
const defaultKeepAlivePeriod = 20;

lib/src/binding_mqtt/mqtt_config.dart

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ import "constants.dart";
1414
/// The default [QoS] values for the different operation types will be used if
1515
/// no Quality of Service is defined in the respective form.
1616
///
17-
/// If no [readTimeout] or [discoveryTimeout] is defined, a [defaultTimeout] of
18-
/// 10 seconds will be used. Furthermore, the [keepAlivePeriod] defaults to 20
19-
/// seconds.
17+
/// If no [readTimeout] is defined, a [defaultReadTimeout] of
18+
/// 10 seconds will be used.
19+
/// Furthermore, the [keepAlivePeriod] defaults to a [defaultKeepAlivePeriod] of
20+
/// 20 seconds.
2021
class MqttConfig {
2122
/// Creates a new [MqttConfig] object.
2223
MqttConfig({
2324
this.defaultReadQoS = QoS.atMostOnce,
2425
this.defaultWriteQoS = QoS.atMostOnce,
2526
this.defaultActionQoS = QoS.atMostOnce,
2627
this.defaultSubscribeQoS = QoS.atLeastOnce,
27-
this.readTimeout = defaultTimeout,
28-
this.discoveryTimeout = defaultTimeout,
28+
this.readTimeout = defaultReadTimeout,
2929
this.keepAlivePeriod = defaultKeepAlivePeriod,
3030
});
3131

@@ -50,11 +50,6 @@ class MqttConfig {
5050
/// If no value has been read until the timeout has expired, the operation
5151
/// will be canceled.
5252
final Duration readTimeout;
53-
54-
/// Timeout value used for discovery using MQTT.
55-
///
56-
/// The discovery process will be aborted once the timeout has expired.
57-
final Duration discoveryTimeout;
5853
}
5954

6055
/// Enum for indicating the default Quality of Service (QoS) that should be used

0 commit comments

Comments
 (0)