Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android14设备,使用3.6.4,经常会断开连接,提示:已断开连接 (32109) - java.net.SocketException: Software caused connection abort #666

Open
BlackLyd opened this issue Aug 6, 2024 · 3 comments

Comments

@BlackLyd
Copy link

BlackLyd commented Aug 6, 2024

请问这个是什么原因啊?我为了google过审,需要升级到android14,我按照google的标准升级后使用org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5这个库会一直断开连接,我替换成咱们的3.6.4后不会一直断开连接了,但是会偶尔断开,我打断点跟踪看到CommsReceiver里的clientComms.shutdownConnection(token, ex);ex提示是 java.net.SocketException: Software caused connection abort,我这边看是只有android14会有这个问题,请问怎么解决啊?

刚刚又断了,打断点跟踪看到ex提示是:已断开连接 (32109) - java.io.EOFException

@FJEagle
Copy link
Contributor

FJEagle commented Sep 11, 2024

这种很可能就是网络异常了,尤其android手机在应用处于后台等原因时,网络都可能变化,考虑业务层做一下重连。

This is likely due to a network anomaly, especially when an Android phone may experience changes in connectivity while the app is in the background. Consider implementing a reconnection mechanism at the application layer.

PS: 这个库的主要维护者未必会中文,至少附一个问题的英文版描述(翻译软件翻也行),可能作者会更加方便回复.

@moo611
Copy link

moo611 commented Oct 28, 2024

请问这个是什么原因啊?我为了google过审,需要升级到android14,我按照google的标准升级后使用org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5这个库会一直断开连接,我替换成咱们的3.6.4后不会一直断开连接了,但是会偶尔断开,我打断点跟踪看到CommsReceiver里的clientComms.shutdownConnection(token, ex);ex提示是 java.net.SocketException: Software caused connection abort,我这边看是只有android14会有这个问题,请问怎么解决啊?

刚刚又断了,打断点跟踪看到ex提示是:已断开连接 (32109) - java.io.EOFException

你切到后台的时候用foregroundService了吗

@hubaoyu
Copy link

hubaoyu commented Jan 10, 2025

是在后台还是前台出现的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants