(core) curl perform error displayed (#3519)

This commit is contained in:
qgarnier 2022-03-02 10:38:29 +01:00 committed by GitHub
parent 94a7374394
commit ea238a2983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -408,6 +408,7 @@ sub request {
$self->{curl_easy}->perform(); $self->{curl_easy}->perform();
}; };
if ($@) { if ($@) {
my $err = $@;
if (ref($@) eq "Net::Curl::Easy::Code") { if (ref($@) eq "Net::Curl::Easy::Code") {
my $num = $@; my $num = $@;
if ($num == $self->{constant_cb}->(name => 'CURLE_OPERATION_TIMEDOUT')) { if ($num == $self->{constant_cb}->(name => 'CURLE_OPERATION_TIMEDOUT')) {
@ -416,7 +417,7 @@ sub request {
} }
if (!defined($self->{response_code})) { if (!defined($self->{response_code})) {
$self->{output}->add_option_msg(short_msg => 'curl perform error : ' . $@); $self->{output}->add_option_msg(short_msg => 'curl perform error : ' . $err);
$self->{output}->option_exit(); $self->{output}->option_exit();
} }
} }