]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/pinger.pm
Merge branch 'master' of ssh://git.ikiwiki.info
[git.ikiwiki.info.git] / IkiWiki / Plugin / pinger.pm
index 588f7a42a4698f6ce72e24b4647df2bedc862c7a..b2d54af8ac269cd63e95913073919cfd2b496052 100644 (file)
@@ -72,7 +72,7 @@ sub ping {
                my $ua;
                eval q{use LWPx::ParanoidAgent};
                if (!$@) {
-                       $ua=LWPx::ParanoidAgent->new;
+                       $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
                }
                else {
                        eval q{use LWP};
@@ -80,7 +80,7 @@ sub ping {
                                debug(gettext("LWP not found, not pinging"));
                                return;
                        }
-                       $ua=LWP::UserAgent->new;
+                       $ua=useragent();
                }
                $ua->timeout($config{pinger_timeout} || 15);