lib/zmq/socket.rb in rbczmq-0.4 vs lib/zmq/socket.rb in rbczmq-0.5
- old
+ new
@@ -118,10 +118,10 @@
if priority_peers.size > 1
# highest weight preferred
res = priority_peers.sort{|a,b| a.weight <=> b.weight }.last
end
return uri unless res
- "tcp://#{res.target}:#{res.port}"
+ "tcp://#{Resolv.getaddress(res.target)}:#{res.port}"
rescue
uri
end
end