fix: change address based on binding, bind ports dont use localhost.
ref: N25B-205
This commit is contained in:
@@ -65,6 +65,7 @@ class RICommunicationAgent(Agent):
|
|||||||
logger.info("Setting up %s", self.jid)
|
logger.info("Setting up %s", self.jid)
|
||||||
retries = 0
|
retries = 0
|
||||||
|
|
||||||
|
|
||||||
# Let's try a certain amount of times before failing connection
|
# Let's try a certain amount of times before failing connection
|
||||||
while retries < max_retries:
|
while retries < max_retries:
|
||||||
# Bind request socket
|
# Bind request socket
|
||||||
@@ -105,7 +106,11 @@ class RICommunicationAgent(Agent):
|
|||||||
id = port_data["id"]
|
id = port_data["id"]
|
||||||
port = port_data["port"]
|
port = port_data["port"]
|
||||||
bind = port_data["bind"]
|
bind = port_data["bind"]
|
||||||
|
|
||||||
|
if not bind:
|
||||||
addr = f"tcp://localhost:{port}"
|
addr = f"tcp://localhost:{port}"
|
||||||
|
else:
|
||||||
|
addr = f"tcp://*:{port}"
|
||||||
|
|
||||||
match id:
|
match id:
|
||||||
case "main":
|
case "main":
|
||||||
|
|||||||
Reference in New Issue
Block a user