diff options
author | Eric Wong <e@80x24.org> | 2016-08-26 21:38:54 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-08-31 02:48:17 +0000 |
commit | 622d5ab17846bc58c2e0cfd98b3a8b73ad341c0d (patch) | |
tree | 68929dfbff84640fc1ea8a8264ee62ed04a9b42d /lib/mogilefs/mogilefs.rb | |
parent | cea8d77382e42132f4a433d59a5dc37fcc295ec3 (diff) | |
download | mogilefs-client-622d5ab17846bc58c2e0cfd98b3a8b73ad341c0d.tar.gz |
This can be useful for specifying a different timeout for establishing a connection. Some requests could be expensive and want a higher :timeout measured in seconds, while the time to establish a TCP connection on a healthy LAN could be less than a millisecond. This defaults to 3s to match the existing :timeout, but only affects the amount of time the client will wait for establishing a TCP connection to a tracker.
Diffstat (limited to 'lib/mogilefs/mogilefs.rb')
-rw-r--r-- | lib/mogilefs/mogilefs.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/mogilefs/mogilefs.rb b/lib/mogilefs/mogilefs.rb index f454a0f..d17f0b8 100644 --- a/lib/mogilefs/mogilefs.rb +++ b/lib/mogilefs/mogilefs.rb @@ -64,6 +64,10 @@ class MogileFS::MogileFS < MogileFS::Client # Timeout for tracker backend responses. # Defaults to 3 seconds. # + # [:connect_timeout => Integer] + # + # Timeout for connecting to a tracker + # Defaults to 3 seconds def initialize(args = {}) @domain = args[:domain] |