3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 05:49:27 +01:00

WebPaste: restart alarm after pasting with UA::Paranoid

This commit is contained in:
Pragmatic Software 2020-02-04 03:13:44 -08:00
parent 623ed7d317
commit 9d1cdef881

View File

@ -81,6 +81,7 @@ sub paste_ixio {
push @{ $ua->requests_redirectable }, 'POST';
my %post = ('f:1' => $text);
my $response = $ua->post("http://ix.io", \%post);
alarm 1; # LWP::UserAgent::Paranoid kills alarm
return "error pasting: " . $response->status_line if not $response->is_success;
my $result = $response->content;
$result =~ s/^\s+//;