From e5c1b551555cfd003df495e166e941d0c7d10179 Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Thu, 15 Sep 2011 07:51:33 -0700 Subject: [PATCH] Fixed small order of operations error in self.local_ip() Change-Id: I6f4fe5255aa54e88cf14838f34a65fd9bb6515d5 --- common/lib/vcap/common.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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