Skip to content

Commit c49a670

Browse files
committed
Fix Bug 443374 - connection will not reconnect after connection lost if cleanSession is set to true
Change-Id: I569e490a06d2869ebb50141b98414daf18dbd238 Signed-off-by: zyang5e4 <zyyangbj@cn.ibm.com>
1 parent 4070c75 commit c49a670

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
@@ -963,7 +963,7 @@ public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
963963
* if cleanSession is true, we need to regard this as a disconnection
964964
*/
965965
void offline() {
966-
// LogUtil.i(TAG, "MqttServiceClient disconnected:"+disconnected+" cleanSession:"+cleanSession);
966+
967967
if (!disconnected && !cleanSession) {
968968
Exception e = new Exception("Android offline");
969969
connectionLost(e);
@@ -988,7 +988,7 @@ synchronized void reconnect() {
988988
return;
989989
}
990990

991-
if (disconnected && !cleanSession) {
991+
if (disconnected) {
992992
// use the activityToke the same with action connect
993993
service.traceDebug(TAG,"Do Real Reconnect!");
994994
final Bundle resultBundle = new Bundle();

0 commit comments

Comments
 (0)