From baa2c7dea2ec84ce9e0ba986ff5ad0d5dd1d675b Mon Sep 17 00:00:00 2001 From: Konstantin Ananev Date: Thu, 19 Dec 2024 00:36:17 +0300 Subject: [PATCH] Fixed a bug in the receive_transaction method that ensures the correct termination of the loop. --- rcon/battleye/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rcon/battleye/client.py b/rcon/battleye/client.py index 1c6b007..f06e695 100644 --- a/rcon/battleye/client.py +++ b/rcon/battleye/client.py @@ -77,6 +77,8 @@ class Client(BaseClient, socket_type=SOCK_DGRAM): if isinstance(response, CommandResponse): command_responses.append(response) seq = response.seq + if len(command_responses) >= seq: + break continue if isinstance(response, ServerMessage): @@ -85,8 +87,6 @@ class Client(BaseClient, socket_type=SOCK_DGRAM): if login_response is not None: return login_response - if len(command_responses) >= seq: - break return "".join( command_response.message