Dinnerbone / mcstatus

A Python class for checking the status of an enabled Minecraft server
http://dinnerbone.com/minecraft/tools/status/
1.11k stars 146 forks source link

Resolve DNS before sending packets #26

Closed shoghicp closed 9 years ago

shoghicp commented 9 years ago

This fixes some servers with long DNS queries or slow resolution not getting UDP queries correctly.

This only matters for the UDP case as it'll resolve the DNS each time a packet is sent, spending extra time or receiving an invalid/different record each time. TCP methods (ping) don't have this issue since they maintain the connection opened (so only one DNS resolution is made).

Dinnerbone commented 9 years ago

<3