endel / NativeWebSocket

🔌 WebSocket client for Unity - with no external dependencies (WebGL, Native, Android, iOS, UWP)
Other
1.27k stars 161 forks source link

Fix disconnect via keepalive, invoke DispatchMessageQueue to handle received messages #97

Open Tossrock opened 1 week ago

Tossrock commented 1 week ago

Connections are automatically dropped after a timeout due to this bug in C#'s handling of websocket traffic. This should fix Issue 92.

Also actually invokes DispatchMessageQueue when receiving a message, so that OnMessage handlers actually get called. Seems that there was code commented out on L672 - L676 in WebSocket.cs without the correct replacement being added. This causes OnMessage events to behave as expected.