cordova-plugin-websocket-server
cordova-plugin-websocket-server copied to clipboard
Reconnecting clients after server app is closed
Hi all,
I want to ask about the following issue:
When the server app that uses this plugin is closed, the clients that are connected at the time get a 1006 error. Then, after the server app is restarted the clients can't connect back again, and keep receiving the same error code.
Does anyone know how can the clients connect back without getting that error? I have tried to get the server to close connections by detecting beforeunload, but it is not working.
Any help will be really appreciated
Thanks.
Hello, Do you bind the server to a specific port ? If yes, maybe that port is not freed up.
@becvert Sorry for the late reply. I haven't been active in this account for a while. The issue seemed to be fixed using setReuseAddr(true). Thanks