Android Autobahn上的Websockets连接有时会丢失

Android Autobahn上的Websockets连接有时会丢失,android,autobahn,autobahnws,Android,Autobahn,Autobahnws,我在Android和iOS上都有一个聊天应用程序。在安卓系统上,我使用的是高速公路。在iOS上,我正在使用SocketRocket。在服务器端,我使用Autobahn for Python 有时,我的消息将无法在Android上发送,因为连接已断开。我在iOS上没有看到这个问题。我不认为这是一个服务器问题,因为它在iOS上一直运行良好(据我所知)。我还没有重新启动服务器或任何东西。有时,这些消息在Android上工作 以下是我尝试发送消息时的日志消息: 01-18 23:49:51.307 18

我在Android和iOS上都有一个聊天应用程序。在安卓系统上,我使用的是高速公路。在iOS上,我正在使用SocketRocket。在服务器端,我使用Autobahn for Python

有时,我的消息将无法在Android上发送,因为连接已断开。我在iOS上没有看到这个问题。我不认为这是一个服务器问题,因为它在iOS上一直运行良好(据我所知)。我还没有重新启动服务器或任何东西。有时,这些消息在Android上工作

以下是我尝试发送消息时的日志消息:

01-18 23:49:51.307 1875-1875/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketConnection: opening handshake received

01-18 23:49:51.379 1875-1875/com.greenrobot.yesorno D/MoPub: Refresh disabled for ad unit (8fb0facec32111e295fa123138070049).

01-18 23:49:51.383 1875-1918/com.greenrobot.yesorno D/OpenGLRenderer: endAllStagingAnimators on 0xdd232b80 (ListView) with handle 0xe12c0f00

01-18 23:49:58.960 1875-2726/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketReader: run() : ConnectionLost

01-18 23:49:58.961 1875-2726/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketReader: ended

01-18 23:49:58.961 1875-1875/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketConnection: fail connection [code = 3, reason = WebSockets connection lost

01-18 23:49:58.961 1875-1875/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketReader: quit

01-18 23:49:58.961 1875-2727/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketWriter: ended

01-18 23:49:58.962 1875-1875/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketConnection: worker threads stopped

有人知道如何解决这个连接丢失的问题吗,或者你知道另一个适用于Android的websocket库吗?

Autobahn不是一个适用于Android的支持良好的websocket实现。对我来说,高速公路的交易破坏者是,这似乎仍然不被支持


这涵盖了针对Android的现有websocket实现。答案详细说明了这些实现中的一些已知问题。根据您的特定项目要求,您可能可以取消几个选项

谢谢,我切换到NVWebSocket客户端,虽然我还没有对它进行彻底测试,但它现在就可以工作了。