mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-26 20:52:37 +01:00
WebPaste: restart alarm after pasting with UA::Paranoid
This commit is contained in:
parent
623ed7d317
commit
9d1cdef881
@ -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+//;
|
||||
|
Loading…
Reference in New Issue
Block a user