[BugFix] Use IP4 localhost form for zmq bind (#7163)

This commit is contained in:
Nick Hill 2024-08-05 08:41:03 -07:00 committed by GitHub
parent e9630458c7
commit 003f8ee128
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,7 +30,9 @@ class AsyncEngineRPCServer:
# Init socket for readiness state.
self.socket = self.context.socket(zmq.constants.ROUTER)
self.socket.bind(f"tcp://localhost:{port}")
# Note numeric form of localhost should be used for zmq bind(),
# see https://stackoverflow.com/a/8958414
self.socket.bind(f"tcp://127.0.0.1:{port}")
def cleanup(self):
"""Cleanup all resources."""