Skip to content

Commit 9433707

Browse files
Al Stockdill-ManderGerrit Code Review @ Eclipse.org
authored andcommitted
Merge "Fix bug 443744 - MQTTClient generate invalid client id for Websphere MQ 8.0" into develop
2 parents 7db2c0f + aa82b7a commit 9433707

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/MqttAsyncClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public class MqttAsyncClient implements IMqttAsyncClient { // DestinationProvide
7878
private static final String CLASS_NAME = MqttAsyncClient.class.getName();
7979
private static final Logger log = LoggerFactory.getLogger(LoggerFactory.MQTT_CLIENT_MSG_CAT,CLASS_NAME);
8080

81-
private static final String CLIENT_ID_PREFIX = "paho-";
81+
private static final String CLIENT_ID_PREFIX = "paho";
8282
private static final long QUIESCE_TIMEOUT = 30000; // ms
8383
private static final long DISCONNECT_TIMEOUT = 10000; // ms
8484
private static final char MIN_HIGH_SURROGATE = '\uD800';
@@ -791,7 +791,7 @@ public void setCallback(MqttCallback callback) {
791791
}
792792

793793
/**
794-
* Returns a randomly generated client identifier based on the the fixed prefix (paho-)
794+
* Returns a randomly generated client identifier based on the the fixed prefix (paho)
795795
* and the system time.
796796
* <p>When cleanSession is set to false, an application must ensure it uses the
797797
* same client identifier when it reconnects to the server to resume state and maintain
@@ -800,7 +800,7 @@ public void setCallback(MqttCallback callback) {
800800
* @see MqttConnectOptions#setCleanSession(boolean)
801801
*/
802802
public static String generateClientId() {
803-
//length of nanoTime = 15, so total length = 20 < 65535(defined in spec)
803+
//length of nanoTime = 15, so total length = 19 < 65535(defined in spec)
804804
return CLIENT_ID_PREFIX + System.nanoTime();
805805
}
806806

0 commit comments

Comments
 (0)