SocketIOClient-Unreal
SocketIOClient-Unreal copied to clipboard
Somethins wrong when connect again after disconnect.
Steps to reproduce: connect1 - disconnect1 - connect2. Problem is , in connect2, No callback OnConnected be called, and the property bIsConnected is false.
Is the disconnect happening on client or server side? Do you receive OnConnectionProblems
callback?
It's happened on client side, and there is not OnConnectionProblems callback received.
Actually, SocketIOClient-Unreal-example can also be reproduced.
P1 is first time connect, P2 is disconnect and P3 is connect after disconnected.
Plugin version 1.6 & ue4.26 socket server version: 3.0+
By the way, if I don't disconnect and connect directly again, there is no problem, it will receive the callback of OnConnected.
Try changing Unbind Events on Disconnect
toggle on your component and see if that changes the behavior for you
Nothing seems to have changed.
I see the code. SetupCallbacks will be call when the component is initialized. and ClearCallbacks will be called when disconnected. If connect again, SetupCallbacks will not be called again. Is this the cause?
I call SetupCallbacks when connected, the tests showed that there was no problem, but I'm not sure whether this is the correct modification.