Edit:
Issue seems to be resolved! It was a small miss on my side, I forgot to set websocket write mode to WRITE_MODE_TEXT.
Leaving the message I wrote tho, just in case if some lost Godot soul would encounter similar issues.
Thank you for your help, despite this being such stupid newbie mistake.
============================================================
That was my thoughts exactly. But it seems strange to me, that all other websocket connection works (like chat, for that matter), but this one doesn’t.
Sorry for the long time to response, had some stuff to do - but in the meantime I went deep into Godot code… and after finding code for websocket, it came out that:
- Despite Godot being written in C++, it uses javascript for websockets;
- Interestingly, onclose never fires. It’s not like it is ignored by godot, it just never actually gets called.
- Only way I found this in theory could be possible (although logically shouldn’t still happen), is if connection closes during polling, but it’s quite unclear. After all, no matter when connection is closed, it should fire onclose function.