B4J Question Automatic Reconnecting WebSocket-Event fires multiple times

prajinpraveen

Active Member
Licensed User
Longtime User
Hello All,

I am using Automatic reconnecting websocket.
When the server is stopped and started, the client connects to the server, like the way the name suggests.

However, I notice that the button click event is triggered as the same number of times the client loses the connection.
Steps to replicate.
1. start the server
2. click the "guess" button on the browser
3. stop the server
4. client loses the connection
5. start the server
6. client reconnects
7. click the "guess" button on the browser
8. Log shows the event is triggered twice
9. repeat step 3 - 7

any work around to resolve this?

Thank you
 

Attachments

  • WebAppHelloWorld.zip
    13.3 KB · Views: 243

prajinpraveen

Active Member
Licensed User
Longtime User
Thanks, Erel. I understand it now.
I have a few questions about WebSockets, which I will post as separate posts.

All the best for 2021
 
Upvote 0
Top