mirror of
https://github.com/chocolate-doom/master-server.git
synced 2024-11-21 12:01:13 +00:00
Fix hole punch parsing with no port.
If the port is the default port we won't include the :port part of the server address. In this case we must assume the default port. This should fix clients being unable to connect to servers when they run on the default port and require hole punch assistance.
This commit is contained in:
parent
0777aac061
commit
3cb43a5e5f
1 changed files with 4 additions and 1 deletions
|
@ -382,7 +382,10 @@ class MasterServer:
|
|||
# a server that we have registered.
|
||||
_, server_addr_str = read_string(data)
|
||||
self.log_output(addr, "Hole punch request for %r" % server_addr_str)
|
||||
a, p = server_addr_str.split(":", 1)
|
||||
if ":" in server_addr_str:
|
||||
a, p = server_addr_str.split(":", 1)
|
||||
else:
|
||||
a, p = server_addr_str, 2342
|
||||
server_addr = (a, int(p))
|
||||
|
||||
if server_addr not in self.servers:
|
||||
|
|
Loading…
Reference in a new issue