Open Joshi425 opened 3 years ago
Sorry, haven't played with anything Minecraft related in ages, and likely won't have a chance to fix this myself. But if you feel like opening a pull request which adds a timeout I will happily review/test it, then release a new version to pypi.
This is an issue I assume is caused by the socket being implemented as 'blocking'. If I have time, I'll look into it and fix it so that it uses a non-blocking socket. As for now I have forked the repo and will create a pull request as soon as I have it working.
So I've now merged and released a version that supports timeout. Which should mostly handle this... but @steveroch-rs if you want to still have a go at implementing non-blocking sockets, we can instead switch to that, but timeout should work for now.
@Joshi425 can you retest and see if the timeout fixes your issue?
Hi there,
when I try a command on a connection where the MC Server died or restarted, it results in python using an full CPU Core:
the command never stops. the only way to recover from that is to restart the python script. Maybe a Timeout for Command or the connection would make sense. Related: https://github.com/Joshi425/minecraft-exporter/issues/11