eclipse-paho / paho.mqtt.android

MQTT Android
Other
2.93k stars 888 forks source link

android will connectionLost frequently #437

Open dongaqa opened 4 years ago

dongaqa commented 4 years ago

Description of Bug:

after MqttAndroidClient connect success,it will throw java.net.SocketException: Software caused connection abort some time.

Console Log output :

2020-10-22 21:41:49.116 17759-17759/ D/TAG_MQTT: connect onSuccess 2020-10-22 21:41:49.128 17759-17759/ D/TAG_MQTT: >>>>>main connectComplete isreconnect:false 2020-10-22 21:46:15.026 17759-17759/ D/TAG_MQTT: XXXXXmain connectionLost (32109) - java.net.SocketException: Software caused connection abort 2020-10-22 21:46:16.575 17759-17759/ D/TAG_MQTT: >>>>>main connectComplete isreconnect:true 2020-10-22 21:46:17.474 17759-17759/ D/TAG_MQTT: XXXXXmain connectionLost (32109) - java.net.SocketException: Software caused connection abort 2020-10-22 21:46:18.633 17759-17759/ D/TAG_MQTT: >>>>>main connectComplete isreconnect:true 2020-10-22 21:53:49.085 17759-17759/ D/TAG_MQTT: XXXXXmain connectionLost (32109) - java.net.SocketException: Software caused connection abort 2020-10-22 21:53:50.579 17759-17759/ D/TAG_MQTT: >>>>>main connectComplete isreconnect:true 2020-10-22 21:53:52.278 17759-17759/ D/TAG_MQTT: XXXXXmain connectionLost (32109) - java.net.SocketException: Software caused connection abort 2020-10-22 21:53:57.148 17759-17759/ D/TAG_MQTT: >>>>>main connectComplete isreconnect:true

hannesa2 commented 3 years ago

I merged almost all open pull requests, included this fix. You can give it a try and use it

https://github.com/hannesa2/paho.mqtt.android/releases/tag/2.0