Restore available() conf (Closes: #1934)

This commit is contained in:
Xavier Guimard 2019-09-16 16:08:19 +02:00
parent 7e2de7853b
commit fe2cc803f7

View File

@ -400,18 +400,18 @@ sub getDBConf {
sub _launch { sub _launch {
my $self = shift; my $self = shift;
my $sub = shift; my $sub = shift;
my $res; my @res;
eval { eval {
local $SIG{ALRM} = sub { die "TIMEOUT\n" }; local $SIG{ALRM} = sub { die "TIMEOUT\n" };
eval { eval {
alarm( $self->{confTimeout} || 10 ); alarm( $self->{confTimeout} || 10 );
$res = &{ $self->{type} . "::$sub" }( $self, @_ ); @res = &{ $self->{type} . "::$sub" }( $self, @_ );
}; };
alarm 0; alarm 0;
die $@ if $@; die $@ if $@;
}; };
$msg .= $@ if $@; $msg .= $@ if $@;
return $res; return wantarray ? (@res) : $res[0];
} }
## @method boolean prereq() ## @method boolean prereq()