We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bae8c69 + e98bc8d commit 91a304cCopy full SHA for 91a304c
src/ZMQ.jl
@@ -58,12 +58,14 @@ import PrecompileTools: @compile_workload
58
59
s2=Socket(REQ)
60
61
- ZMQ.bind(s1, "tcp://localhost:*")
+ # zmq < 4.3.5 can only bind to ip address or network interface, not hostname
62
+ localhost_ip = Sockets.getaddrinfo("localhost", Sockets.IPv4)
63
+ ZMQ.bind(s1, "tcp://$(localhost_ip):*")
64
# Strip the trailing null-terminator
65
last_endpoint = s1.last_endpoint[1:end - 1]
66
# Parse the port from the endpoint
67
port = parse(Int, split(last_endpoint, ":")[end])
- ZMQ.connect(s2, "tcp://localhost:$(port)")
68
+ ZMQ.connect(s2, "tcp://$(localhost_ip):$(port)")
69
70
msg = Message("test request")
71
0 commit comments