Permalink
Browse files

Support passing a timeout argument to the Backend creation for mogadm…

… usage.

git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@1373 f67b2e87-0811-0410-a7e0-dd94e48410d6
  • Loading branch information...
1 parent d083e95 commit d35ae21e7d0ac7e62152b822b8e9cd4915f91a13 robbat2 committed Nov 30, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/MogileFS/Admin.pm
View
4 lib/MogileFS/Admin.pm
@@ -11,7 +11,9 @@ sub new {
my %args = @_;
$self->{readonly} = $args{readonly} ? 1 : 0;
- $self->{backend} = MogileFS::Backend->new( hosts => $args{hosts} )
+ my %backend_args = ( hosts => $args{hosts} );
+ $backend_args{timeout} = $args{timeout} if $args{timeout};
+ $self->{backend} = MogileFS::Backend->new( %backend_args )
or _fail("couldn't instantiate MogileFS::Backend");
return $self;

0 comments on commit d35ae21

Please sign in to comment.