Skip to content

Commit 0b8ecc5

Browse files
authored
Merge pull request #257 from JuliaInterop/precompile-ip
Hardcode precompilation IP address to 127.0.0.1
2 parents b4f30ae + f3f8fa9 commit 0b8ecc5

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ZMQ"
22
uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1"
3-
version = "1.4.0"
3+
version = "1.4.1"
44

55
[deps]
66
FileWatching = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"

docs/src/_changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ CurrentModule = ZMQ
77
This documents notable changes in ZMQ.jl. The format is based on [Keep a
88
Changelog](https://keepachangelog.com).
99

10-
## Unreleased
10+
## [v1.4.1] - 2025-06-13
1111

1212
### Changed
1313
- Implemented `Base.show()` methods for [`Socket`](@ref) and [`Context`](@ref)
1414
for pretty-printing ([#255]).
1515

16+
### Fixed
17+
- The precompilation workload now hardcodes the use of IP address `127.0.0.1`
18+
instead of resolving `localhost`, which fixes precompilation on machines that
19+
may have `localhost` resolve to a different node ([#257]).
20+
1621
## [v1.4.0] - 2024-11-30
1722

1823
### Added

src/ZMQ.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,13 @@ import PrecompileTools: @compile_workload
6868

6969
s2=Socket(REQ)
7070

71-
# zmq < 4.3.5 can only bind to ip address or network interface, not hostname
72-
localhost_ip = Sockets.getaddrinfo("localhost", Sockets.IPv4)
73-
ZMQ.bind(s1, "tcp://$(localhost_ip):*")
71+
# Note that ZMQ < 4.3.5 can only bind to IP address or network interface, not hostname
72+
ZMQ.bind(s1, "tcp://127.0.0.1:*")
7473
# Strip the trailing null-terminator
7574
last_endpoint = s1.last_endpoint[1:end - 1]
7675
# Parse the port from the endpoint
7776
port = parse(Int, split(last_endpoint, ":")[end])
78-
ZMQ.connect(s2, "tcp://$(localhost_ip):$(port)")
77+
ZMQ.connect(s2, "tcp://127.0.0.1:$(port)")
7978

8079
msg = Message("test request")
8180

0 commit comments

Comments
 (0)