fix port parsing
This commit is contained in:
parent
b2efaf8ece
commit
7e3088ae1d
1 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ class Player(Thread):
|
||||||
|
|
||||||
def ping(self):
|
def ping(self):
|
||||||
data = 'NEXT'
|
data = 'NEXT'
|
||||||
if ':' in self.peer:
|
if ':' in self.peer[0]:
|
||||||
sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
|
sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
|
||||||
else:
|
else:
|
||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||||
|
@ -108,7 +108,7 @@ class Player(Thread):
|
||||||
|
|
||||||
def get_position(self):
|
def get_position(self):
|
||||||
try:
|
try:
|
||||||
if ':' in self.peer:
|
if ':' in self.peer[0]:
|
||||||
sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
|
sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
|
||||||
else:
|
else:
|
||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||||
|
|
Loading…
Reference in a new issue