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):
|
||||
data = 'NEXT'
|
||||
if ':' in self.peer:
|
||||
if ':' in self.peer[0]:
|
||||
sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
|
||||
else:
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
@ -108,7 +108,7 @@ class Player(Thread):
|
|||
|
||||
def get_position(self):
|
||||
try:
|
||||
if ':' in self.peer:
|
||||
if ':' in self.peer[0]:
|
||||
sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
|
||||
else:
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
|
Loading…
Reference in a new issue