fix(matrixbot): replace mcrcon with a thread-safe RCON client

mcrcon implements its read timeout with signal.SIGALRM, which only works
on the main thread. The Minecraft commands call it from a worker thread
via loop.run_in_executor, so it raised "signal only works in main thread
of the main interpreter" on every invocation. The replacement uses
socket.settimeout(), which has no such restriction.

This code was already deployed on LXC 151 but had never been committed,
so any matrixbot deploy would have reverted it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-16 01:37:38 -04:00
co-authored by Claude Opus 5
parent 5d420e318c
commit 7c05827dbc
3 changed files with 73 additions and 16 deletions
-1
View File
@@ -2,4 +2,3 @@ matrix-nio[e2e]
python-dotenv>=1.2.2
aiohttp
markdown
mcrcon