Skip to content

Commit 7c911f0

Browse files
Ranjan-Dasguptaicraggs
authored andcommitted
Signed-off-by: Ranjan-Dasgupta <Ranjan.Dasgupta@us.ibm.com>
Fix for issue #719 modified: org.eclipse.paho.client.mqttv3.test/src/test/java/org/eclipse/paho/client/mqttv3/test/SSLSessionResumptionTest.java modified: org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsReceiver.java
1 parent da0c59a commit 7c911f0

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

org.eclipse.paho.client.mqttv3.test/src/test/java/org/eclipse/paho/client/mqttv3/test/SSLSessionResumptionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static void setUpBeforeClass() throws Exception {
8282
*
8383
* @throws Exception
8484
*/
85-
@Test(timeout=30000)
85+
@Test(timeout=60000)
8686
public void testSSLSessionInvalidated() throws Exception {
8787
//System.setProperty("javax.net.debug", "all");
8888

org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsReceiver.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@ public void run() {
165165
if (message != null) {
166166
// A new message has arrived
167167
clientState.notifyReceivedMsg(message);
168-
}
168+
} else {
169+
// fix for bug 719
170+
if (!clientComms.isConnected()) {
171+
throw new MqttException(MqttException.REASON_CODE_CONNECTION_LOST);
172+
}
173+
}
169174
}
170175
}
171176
catch (MqttException ex) {

0 commit comments

Comments
 (0)