Skip to content

Commit

Permalink
fix: support python 3.10
Browse files Browse the repository at this point in the history
`__int__` no more called for ctypes fields, removed in bpo-41974

Fixes #2
  • Loading branch information
spumer committed Dec 24, 2021
1 parent 092e6fb commit 731c7d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqredirect/redirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ def main(all_ports, interface=None):

for ip, ports in all_ports.items():
for game_port, proxy_port in ports.items():
addr_gameserver2proxy_port[AddrKey(ip, game_port)] = c_uint16(proxy_port)
addr_proxy2gameserver_port[AddrKey(ip, proxy_port)] = c_uint16(game_port)
addr_gameserver2proxy_port[AddrKey(int(ip), game_port)] = c_uint16(proxy_port)
addr_proxy2gameserver_port[AddrKey(int(ip), proxy_port)] = c_uint16(game_port)

else:
assert len(ip_addrs) == 1
Expand Down

0 comments on commit 731c7d0

Please sign in to comment.