diff --git a/common/lib/vcap/common.rb b/common/lib/vcap/common.rb index de18394..b5b987f 100644 --- a/common/lib/vcap/common.rb +++ b/common/lib/vcap/common.rb @@ -11,7 +11,8 @@ module VCAP def self.local_ip(route = A_ROOT_SERVER) route ||= A_ROOT_SERVER - orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true + orig = Socket.do_not_reverse_lookup + Socket.do_not_reverse_lookup = true UDPSocket.open {|s| s.connect(route, 1); s.addr.last } ensure Socket.do_not_reverse_lookup = orig