(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
1 changed files with 2 additions and 1 deletions

View File

@ -408,6 +408,7 @@ sub request {
$self->{curl_easy}->perform();
};
if ($@) {
my $err = $@;
if (ref($@) eq "Net::Curl::Easy::Code") {
my $num = $@;
if ($num == $self->{constant_cb}->(name => 'CURLE_OPERATION_TIMEDOUT')) {
@ -416,7 +417,7 @@ sub request {
}
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();
}
}