Skip to content

Commit 3aece88

Browse files
committed
FREE-72862 fix error variable scope
1 parent b2aaba4 commit 3aece88

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/mongo/address.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def to_s
145145

146146
def initialize_resolver!(timeout, ssl_options)
147147
family = (host == 'localhost') ? ::Socket::AF_INET : ::Socket::AF_UNSPEC
148+
error = nil
148149
::Socket.getaddrinfo(host, nil, family, ::Socket::SOCK_STREAM).detect do |info|
149150
begin
150151
return FAMILY_MAP[info[4]].new(host, port).tap do |res|

0 commit comments

Comments
 (0)