Autoreconnect still active after explicit call to close the WebSocket

51 views
Skip to first unread message

remon...@ordyx.com

unread,
Nov 24, 2018, 1:04:25 PM11/24/18
to CodenameOne Discussions

If autoReconnect is set and you close the WebSocket it will still continue to try and reconnect.


I tried setting autoReconnect to 0 before the call to close() however based on the code it seems like the reconnectTimer is never reset when turning off autoReconnect.


Can this please be fixed as soon as possible?


I opened a new issue: https://github.com/shannah/cn1-websockets/issues/14

Shai Almog

unread,
Nov 25, 2018, 1:18:23 AM11/25/18
to CodenameOne Discussions
As a workaround try ws.autoReconnectTimeout(0).close();

remon...@ordyx.com

unread,
Nov 25, 2018, 7:07:38 PM11/25/18
to CodenameOne Discussions
Same problem.

Shai Almog

unread,
Nov 25, 2018, 11:23:13 PM11/25/18
to CodenameOne Discussions
In that case Steve should follow up in the issue.

remon...@ordyx.com

unread,
Dec 29, 2018, 8:46:54 PM12/29/18
to CodenameOne Discussions
https://github.com/shannah/cn1-websockets/issues/14

I have not received any updates on the issue. Any idea when this will be fixed?

Shai Almog

unread,
Dec 29, 2018, 11:20:06 PM12/29/18
to CodenameOne Discussions
We're on vacation until new years so this would take some time... I posted about that on the blog last week.
Reply all
Reply to author
Forward
0 new messages