eclipse-paho / eclipse-paho/paho.mqtt.java
When I deliberately open a connection with the wrong password,but it not return MqttSecurityException,it return me MqttException
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 919
- PR merge metrics
- No merged PRs in 30d
Description
When I deliberately open a connection with the wrong password,I want to print 111, but it printed 222
MqttConnectOptions mqttConnectOptions = new MqttConnectOptions();
mqttConnectOptions.setAutomaticReconnect(true);
mqttConnectOptions.setCleanSession(true);
mqttConnectOptions.setUserName("****");
mqttConnectOptions.setPassword("***".toCharArray());
try {
mMqttClient.connect(mqttConnectOptions).waitForCompletion();
}catch (MqttSecurityException e){
e.printStackTrace();
Log.e("tag","111");
} catch (MqttException e) {
e.printStackTrace();
Log.e("tag","222");
}
Contributor guide
Research direction
No source files, tests, broker, or client version are named. Start by reproducing the connection attempt from the supplied MqttConnectOptions example and inspect the exception type and reason returned by connect(). Done means establishing whether an authentication failure should be surfaced as MqttSecurityException or documenting the expected exception behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100