diff --git a/rcon/battleye/client.py b/rcon/battleye/client.py index dc5de47..0ac68d8 100644 --- a/rcon/battleye/client.py +++ b/rcon/battleye/client.py @@ -67,12 +67,21 @@ class Client(BaseClient, socket_type=SOCK_DGRAM): """Send a request and receive a response.""" acknowledged = defaultdict(set) command_responses = [] + first = False with self._socket.makefile("wb") as file: file.write(bytes(request)) while True: - response = self.receive() + try: + response = self.receive() + except TimeoutError: + if first: + raise + else: + break + + first = False if isinstance(response, LoginResponse): return response