Skip to content

Commit

Permalink
Perform hostname resolution in caller thread
Browse files Browse the repository at this point in the history
This change should decrease the latency with which a subscriber socket
connects to its publisher, hopefully making the system more stable.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
  • Loading branch information
rtobar committed Jul 6, 2020
1 parent a82a424 commit e6a5b10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daliuge-runtime/dlg/manager/node_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def publish_event(self, evt):
def subscribe(self, host, port):
timeout = 5
finished_evt = threading.Event()
endpoint = "tcp://%s:%d" % (host, port)
endpoint = "tcp://%s:%d" % (utils.zmq_safe(host), port)
self._subscriptions.put(ZMQPubSubMixIn.subscription(endpoint, finished_evt))
if not finished_evt.wait(timeout):
raise DaliugeException("ZMQ subscription not achieved within %d seconds" % (timeout,))
Expand Down

0 comments on commit e6a5b10

Please sign in to comment.