0

I'm facing the following issue: I'm using the de.tavendo.autobahn lib to handle WS connections. I run my app on a Samsung Galaxy s4 mini device, when I run my app, I connect to my WS server and after that I turn the WiFi off I expect receiving a CLOSE_INTERNAL_ERROR code in the onClose() callback. But the event doesn't seem to be fired on debug.

I tried it on an Acer Iconia tablet and it worked well. Is that a specific issue concerning Samsung devices?

Regards.

onizukaek
  • 1,082
  • 1
  • 14
  • 38
  • 1
    ... Autobahn? Are you too a fan of Kraftwerk? – Phantômaxx Jan 15 '14 at 12:22
  • Autobahn == fast (WebSocket): http://autobahn.ws/ ;) – oberstet Jan 15 '14 at 14:35
  • You might try sending stuff e.g. every 1 sec and see what happens if you turn off Wifi. – oberstet Jan 15 '14 at 14:36
  • 1
    Hi again oberset, I did what you suggested and when I take a look at my logs, it seems that the WebSocketConnection object never reach the disconnected state when I switch to airplane mode and my thread keeps on sending messages each second without getting any response. – onizukaek Jan 15 '14 at 17:21
  • More precisely, WebSocketConnection.isConnected() still returns true and WebSocketConnection.sendTextMessage is still working. – onizukaek Jan 15 '14 at 17:29
  • Having the same issue on some devices with OkHttp. The only workaround I found so far is listening to the device's network state and then closing WS manually when device is off network. – ntoskrnl Jan 10 '18 at 17:58

0 Answers0