diff options
Diffstat (limited to 'lib/resolv-replace.rb')
-rw-r--r-- | lib/resolv-replace.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/resolv-replace.rb b/lib/resolv-replace.rb index 5d15b4577c..63d58cea27 100644 --- a/lib/resolv-replace.rb +++ b/lib/resolv-replace.rb @@ -23,7 +23,8 @@ end class UDPSocket alias original_resolv_bind bind def bind(host, port) - original_resolv_bind(IPSocket.getaddress(host), port) + host = IPSocket.getaddress(host) if host != "" + original_resolv_bind(host, port) end alias original_resolv_connect connect |