Skip to content

Commit 7bd0068

Browse files
Ian CraggsGerrit Code Review @ Eclipse.org
authored andcommitted
Merge "Fix Bug 475639 - Added null checks" into develop
2 parents 3236c0a + 2e29c6f commit 7bd0068

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • org.eclipse.paho.android.service/org.eclipse.paho.android.service/src/org/eclipse/paho/android/service

org.eclipse.paho.android.service/org.eclipse.paho.android.service/src/org/eclipse/paho/android/service/MqttConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ void disconnect(long quiesceTimeout, String invocationContext,
414414
service.callbackToActivity(clientHandle, Status.ERROR, resultBundle);
415415
}
416416

417-
if (connectOptions.isCleanSession()) {
417+
if (connectOptions != null && connectOptions.isCleanSession()) {
418418
// assume we'll clear the stored messages at this point
419419
service.messageStore.clearArrivedMessages(clientHandle);
420420
}
@@ -457,7 +457,7 @@ void disconnect(String invocationContext, String activityToken) {
457457
service.callbackToActivity(clientHandle, Status.ERROR, resultBundle);
458458
}
459459

460-
if (connectOptions.isCleanSession()) {
460+
if (connectOptions != null && connectOptions.isCleanSession()) {
461461
// assume we'll clear the stored messages at this point
462462
service.messageStore.clearArrivedMessages(clientHandle);
463463
}

0 commit comments

Comments
 (0)