From 8a5793b1392837fd406e28ffb0d200bdeb7fb44b Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Wed, 18 Aug 2021 09:58:14 +0200 Subject: [PATCH] Fix: stats were tracking "direct-ipv6" connections wrong (#46) --- game_coordinator/application/helpers/token_connect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game_coordinator/application/helpers/token_connect.py b/game_coordinator/application/helpers/token_connect.py index bbdc335..c19fdf0 100644 --- a/game_coordinator/application/helpers/token_connect.py +++ b/game_coordinator/application/helpers/token_connect.py @@ -36,7 +36,7 @@ async def connect(self): self._connect_methods = asyncio.Queue() for direct_ip in self._server.direct_ips: server_ip, _, server_port = direct_ip.rpartition(":") - ip_type = "ipv6" if server_ip == "[" else "ipv4" + ip_type = "ipv6" if server_ip.startswith("[") else "ipv4" self._connect_methods.put_nowait( (f"direct-{ip_type}", lambda: self._connect_direct_connect(server_ip, int(server_port))) )