Permalink
Browse files

DRb connects via hostname if IP can't be resolved

Closes gh-16
Closes gh-12
  • Loading branch information...
1 parent 0a01cf7 commit 217c2c4ad37984a1b09e4947fdac61b4225e64cf @sandro committed Nov 1, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/specjour/socket_helper.rb
@@ -4,6 +4,8 @@ module SocketHelper
def ip_from_hostname(hostname)
Socket.getaddrinfo(hostname, nil, Socket::AF_INET, Socket::SOCK_STREAM).first.fetch(3)
+ rescue SocketError
+ hostname
end
def hostname

0 comments on commit 217c2c4

Please sign in to comment.