Bug #7311 » 0001-Fallback-to-localhost-if-hostname-is-not-associated-.patch
lib/drb/drb.rb | ||
---|---|---|
def self.getservername
|
||
host = Socket::gethostname
|
||
begin
|
||
raise unless Socket::ip_address_list.detect {|i| i.ip_address == Addrinfo.ip(host).ip_address}
|
||
Socket::gethostbyname(host)[0]
|
||
rescue
|
||
'localhost'
|
- « Previous
- 1
- 2
- Next »