Skip to content

Commit

Permalink
Fix Bug 475639 - Added null checks
Browse files Browse the repository at this point in the history
Signed-off-by: Dustin Thomson <dthomson@51systems.com>
  • Loading branch information
powturns committed Aug 23, 2015
1 parent 1191172 commit 2e29c6f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void disconnect(long quiesceTimeout, String invocationContext,
service.callbackToActivity(clientHandle, Status.ERROR, resultBundle);
}

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

if (connectOptions.isCleanSession()) {
if (connectOptions != null && connectOptions.isCleanSession()) {
// assume we'll clear the stored messages at this point
service.messageStore.clearArrivedMessages(clientHandle);
}
Expand Down

0 comments on commit 2e29c6f

Please sign in to comment.