From 35b2c74732e6988d29bc42566859008d2650a40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20N=C3=B8rgaard?= Date: Fri, 2 Feb 2024 19:24:53 +0000 Subject: [PATCH] replicate commit 38431171a502370ccf8c447c7ecbfe807384d71 to async codebase --- rcon/source/async_rcon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rcon/source/async_rcon.py b/rcon/source/async_rcon.py index 4c54c90..cfa9428 100644 --- a/rcon/source/async_rcon.py +++ b/rcon/source/async_rcon.py @@ -52,6 +52,7 @@ async def rcon( frag_threshold: int = 4096, frag_detect_cmd: str = "", timeout: int | None = None, + enforce_id: bool = True, ) -> str: """Run a command asynchronously.""" @@ -77,7 +78,7 @@ async def rcon( response = await communicate(reader, writer, request) await close(writer) - if response.id != request.id: + if enforce_id and response.id != request.id: raise SessionTimeout() return response.payload.decode(encoding)