Skip to content

Commit 35408d2

Browse files
committed
RUBY-906 Use host from #getaddrinfo
1 parent f357e4c commit 35408d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongo/address.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def initialize_resolver!(timeout, ssl_options)
148148
error = nil
149149
::Socket.getaddrinfo(host, nil, family, ::Socket::SOCK_STREAM).detect do |info|
150150
begin
151-
return FAMILY_MAP[info[4]].new(host, port).tap do |res|
151+
return FAMILY_MAP[info[4]].new(info[3], port).tap do |res|
152152
res.socket(timeout, ssl_options).connect!
153153
end
154154
rescue IOError, SystemCallError => e

0 commit comments

Comments
 (0)