Open christran opened 3 years ago
Interesting edge case, I wonder if the timing of construction of static socketio components in non-world contexts may impact this. Looking at this branching op for non-world components https://github.com/getnamo/socketio-client-ue4/blob/master/Source/SocketIOClient/Private/SocketIOFunctionLibrary.cpp#L24 I could potentially see that being the case. Try delaying the construction of one of your components by e.g. 0.5 sec see if that changes anything
Tried delaying the construction of the 2nd component but it leads to the same problem.
Also looking at the logs it shows the first socketio component loses connection just before the second socketio component connects.
[2020.12.08-10.01.18:959][485]SocketIOLog: SocketIO Connected with session: WBCgwhARCVCh7J6EAAAA [2020.12.08-10.01.18:959][485]SocketIOLog: SocketIO WBCgwhARCVCh7J6EAAAA connected to namespace: / [2020.12.08-10.01.18:959][485]SocketIOLog: SocketIO WBCgwhARCVCh7J6EAAAA appears to have lost connection, reconnecting attempt 0 with delay 5000 [2020.12.08-10.01.25:987][506]SocketIOLog: SocketIO WBCgwhARCVCh7J6EAAAA appears to have lost connection, reconnecting attempt 1 with delay 7500 [2020.12.08-10.01.33:389][528]SocketIOLog: SocketIO Connected with session: iJFYBjZhe0a9bc_KAAAC [2020.12.08-10.01.33:389][528]SocketIOLog: SocketIO iJFYBjZhe0a9bc_KAAAC connected to namespace: /
1st 2nd
Emitting a event with first constructed SocketIO component (chatserver) doesn't work.
Emitting a event with the second SocketIO component (worldserver) works.
Printing out the plugin scope IDs for both components returns "worldserver" for both when it should return "chatserver" and "worldserver". I guess this is the problem it looks like the last constructed SocketIO component takes over the previous one?
Is this a bug or is it not possible to have more than 1 SocketIOClient Component?