mayzs / paho.mqtt.android

MQTT Android
19 stars 6 forks source link

java.lang.IllegalArgumentException: Invalid ClientHandle #5

Open lucaswu57 opened 6 days ago

lucaswu57 commented 6 days ago

Please fill out the form below before submitting, thank you!

Android API Version Bug Seen on:

Android Version Bug Seen on:

Please also check that if you have found the bug in the Release version (1.1.1) that you check that it also exists in the Snapshot (1.1.2-SNAPSHOT) before raising a bug.

Description of Bug:

在OnDestry Mqtt时有概率会出现 java.lang.IllegalArgumentException: Invalid ClientHandle的错误,在原库中有解决此问题,但是由于库已经不维护了,所以有解决方案但是没有合并进去,是否可以修改合并一个版本? https://github.com/eclipse-paho/paho.mqtt.android/pull/473

Console Log output (if available):

Caused by: java.lang.IllegalArgumentException: Invalid ClientHandle at org.eclipse.paho.android.service.MqttService.getConnection(MqttService.java:589) at org.eclipse.paho.android.service.MqttService.isConnected(MqttService.java:414) at org.eclipse.paho.android.service.MqttAndroidClient.isConnected(MqttAndroidClient.java:255) at com.skyworth.lib_base.data.mqtt.MQTTManager.disconnect(MQTTManager.kt:116) at com.skyworth.module_main.ui.fragment.PlantFragment.onDestroy(PlantFragment.kt:1789) at androidx.fragment.app.Fragment.performDestroy(Fragment.java:3251) at androidx.fragment.app.FragmentStateManager.destroy(FragmentStateManager.java:780)

lucaswu57 commented 6 days ago

image