my $ua;
eval q{use LWPx::ParanoidAgent};
if (!$@) {
- $ua=LWPx::ParanoidAgent->new;
+ $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
}
else {
eval q{use LWP};
debug(gettext("LWP not found, not pinging"));
return;
}
- $ua=LWP::UserAgent->new;
+ $ua=useragent();
}
$ua->timeout($config{pinger_timeout} || 15);