mrniko / netty-socketio

Socket.IO server implemented on Java. Realtime java framework
Apache License 2.0
6.82k stars 1.65k forks source link

Duplicated call of onConnected() in Spring #1015

Open renjithraj2005 opened 1 week ago

renjithraj2005 commented 1 week ago

I'm trying to set up a Socket.IO server with Spring boot, which also serves as an API for my application. I have a React frontend that consumes socket

The problem is when I call my service to connect, it calls the onConnected method of my Spring back twice. I tried to simplify it by removing, for example, the call to the client.joinRoom(sessionCode) method but the logs remain the same.

jakechen0816 commented 1 week ago

Yes, I had this same issue. In Java, addConnectListener is called twice when client connects to the server.

Update: Seems It is fixed in 2.0.12.