require 'resolv'
require 'ipaddr'
require 'yaml'
+require 'timeout'
+
require File.dirname(__FILE__) + '/server/server'
# Module for manage all Whois Class
def search_host
begin
if @host_search
- @host = Resolv.getname self.ip.to_s
+ begin
+ timeout(5) {@host = Resolv.getname self.ip.to_s}
+ rescue Timeout::Error
+ @host=nil
+ end
else
@host = nil
end