Convert port number to an integer
This commit is contained in:
parent
8ea3992ae5
commit
e90bf9df54
|
@ -113,7 +113,7 @@ class NetAddrNoPrefix(object):
|
|||
b += b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + host
|
||||
except socket.error:
|
||||
b += socket.inet_pton(socket.AF_INET6, self.host)
|
||||
b += struct.pack('>H', self.port)
|
||||
b += struct.pack('>H', int(self.port))
|
||||
return b
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in New Issue
Block a user