godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.13k stars 21.19k forks source link

Websockets disconnect when idle on web builds #99032

Open Swarkin opened 4 days ago

Swarkin commented 4 days ago

Tested versions

4.4.dev4 4.3

System information

Windows 11, SteamOS

Issue description

Using Websockets causes the connection to be closed after a while (feels like roughly half a minute) if no data is being sent. This applies to both regular Websockets and the multiplayer functionality.

Steps to reproduce

Minimal reproduction project (MRP)

any project with Websocket functionality on html5

girng commented 3 days ago

might be the websocket's ping/pong mechanism and not related to godot. afaik most common timeouts are 30 seconds

try sending a simple pong message every 5 seconds or something and see if you can replicate the disconnect