0001-Fallback-to-localhost-if-hostname-is-not-associated-.patch

Fallback to localhost if hosntame is not associated with IP - Vit Ondruch, 11/08/2012 11:03 PM

Download (718 Bytes)

View differences:

lib/drb/drb.rb
824 824
    def self.getservername
825 825
      host = Socket::gethostname
826 826
      begin
827
        raise unless Socket::ip_address_list.detect {|i| i.ip_address == Addrinfo.ip(host).ip_address}
827 828
        Socket::gethostbyname(host)[0]
828 829
      rescue
829 830
        'localhost'
830
-