server: fix: stop sending pings on every pong #386
Loading…
Reference in New Issue
No description provided.
Delete Branch "ignaloidas/FoundKey:reduce-pings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This resulted in endless ping-pong traffic on the websocket, happening
every interval of network latency to the server (e.g. for me, with 40ms
latency to my server, it was about every 40ms). On my server this ended
up taking about 20% of foundkey's CPU usage. Now, just send pings every
30s, and check if we have received any pong's in last 60 seconds to
check that the connection is still alive.
Thanks for catching this! I don't know how I would have found this otherwise :P