The first 1000 lines of MqttConnection's code should be
deleted,because the "doAfterConnectFail(resultBundle)" already
call "service.callbackToActivity".
-------------------------------------------------------------------
@Override
public
void onFailure(IMqttToken asyncActionToken, Throwable
exception) {
resultBundle.putString(
MqttServiceConstants.CALLBACK_ERROR_MESSAGE,
exception.getLocalizedMessage());
resultBundle.putSerializable(
MqttServiceConstants.CALLBACK_EXCEPTION,
exception);
service.callbackToActivity(clientHandle,
Status.ERROR,
resultBundle);
doAfterConnectFail(resultBundle);
}
-------------------------------------------------------------------
-------------------------------------------------------------------
private
void doAfterConnectFail(final Bundle resultBundle){
//
acquireWakeLock();
disconnected
= true;
setConnectingState(false);
service.callbackToActivity(clientHandle,
Status.ERROR,resultBundle);
service.retryConnection(this);
releaseWakeLock();
}
-------------------------------------------------------------------
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev