Skip to content

fix: remove blocking ICMP call and get disconnected ping from measuring server status round-trip#2824

Merged
pandinocoder merged 5 commits into
AscensionGameDev:mainfrom
pandinocoder:remove_icmp
Jul 16, 2026
Merged

fix: remove blocking ICMP call and get disconnected ping from measuring server status round-trip#2824
pandinocoder merged 5 commits into
AscensionGameDev:mainfrom
pandinocoder:remove_icmp

Conversation

@pandinocoder

Copy link
Copy Markdown
Member

The ICMP ping introduced to get ping values while not actively connected to a server is a blocking call and blocks for the full length of the timeout (5000ms).

If the server is down or does not respond to ICMP, this means a 5 second block on the main thread.

This PR strips that out, and uses an approximation based on the round-trip time of ServerStatusRequestPacket and ServerStatusResponsePacket to calculate a ping value that can be displayed until a connection is actually established.

@pandinocoder
pandinocoder requested a review from jcsnider July 16, 2026 07:08
@pandinocoder
pandinocoder merged commit 47bccc0 into AscensionGameDev:main Jul 16, 2026
1 check passed
@pandinocoder
pandinocoder deleted the remove_icmp branch July 16, 2026 07:38
@pandinocoder
pandinocoder restored the remove_icmp branch July 16, 2026 07:38
@pandinocoder
pandinocoder deleted the remove_icmp branch July 16, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants