mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-15 12:50:47 +02:00
Fix local addr in version message set in network manager (#1239)
* Fix local addr in version message set in network manager * Use external host when available otherwise use local host
This commit is contained in:
parent
c91f569e95
commit
a2c5f992ce
1 changed files with 3 additions and 3 deletions
|
|
@ -50,8 +50,8 @@ class NetworkManager(object):
|
|||
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
self.local_ip = self.config.node.external_address or socket.gethostbyname(
|
||||
'localhost')
|
||||
self.external_host = self.config.node.external_address
|
||||
self.local_ip = socket.gethostbyname('localhost')
|
||||
self.local_port = self.config.server.rpc_port or squeak.params.params.DEFAULT_PORT
|
||||
self.peer_server = None
|
||||
self.peer_client = None
|
||||
|
|
@ -144,7 +144,7 @@ class NetworkManager(object):
|
|||
@property
|
||||
def external_address(self) -> PeerAddress:
|
||||
return PeerAddress(
|
||||
self.local_ip,
|
||||
self.external_host or self.local_ip,
|
||||
self.local_port,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue