2016-08-13 8 views

答えて

0

Resolvのsource codeを353行目で見ると、DNSクラスに定義されているタイムアウトというメソッドがあることがわかります。これを使用してタイムアウトを変更できるはずです。

# Sets the resolver timeouts. This may be a single positive number 
    # or an array of positive numbers representing timeouts in seconds. 
    # If an array is specified, a DNS request will retry and wait for 
    # each successive interval in the array until a successful response 
    # is received. Specifying +nil+ reverts to the default timeouts: 
    # [ 5, second = 5 * 2/nameserver_count, 2 * second, 4 * second ] 
    # 
    # Example: 
    # 
    # dns.timeouts = 3 
    # 
    def timeouts=(values) 
     @config.timeouts = values 
    end 
関連する問題