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

Add timeout parameter propagation from lookup func #176

Closed Dominique57 closed 2 years ago

Dominique57 commented 2 years ago

Closes #173

As mentioned in the issue, the timeout parameter has been added in the lookup functions and propagated to the appropriate functions.

I have done some small functional / visual testing, which are not included. I only tested MinecraftServer since I don't have a BedrockServer and I tested ping, status and query and also the async variants.

During my small functional testing, I observed that if the URL of the server is a domain name, socket.create_connection can take longer than the specified timeout. This is better described here : https://stackoverflow.com/questions/12232225/python-3-2-3-socket-takes-longer-to-timeout-than-it-should