eclipse-paho / eclipse-paho/paho.mqtt.java
`MqttConnectionOptions` docs lie about default automatic reconnect
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 919
- PR merge metrics
- No merged PRs in 30d
Description
The docs on top of the class say that, by default:
https://github.com/eclipse/paho.mqtt.java/blob/f4e0db802a4433645ef011e711646a09ec9fae89/org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttConnectionOptions.java#L49
But guess what? The default value is no automatic reconnection:
https://github.com/eclipse/paho.mqtt.java/blob/f4e0db802a4433645ef011e711646a09ec9fae89/org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttConnectionOptions.java#L61
To double-check:
```java
var options = new MqttConnectionOptions();
System.out.println("isAutomaticReconnect? " + options.isAutomaticReconnect()); // Prints "false".
```
Contributor guide
Assessment
This issue has not been assessed yet.