Commit 013bfc33 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Wrap request in an eval so that if we are signaled during the

request (and the https code calls die) we can catch it and return a
proper error response.
parent f0af165a
......@@ -334,9 +334,21 @@ sub CallMethodInternal($$$$@)
$hreq->protocol('HTTP/1.0') if ($FBSD_MAJOR >= 8);
my $hresp = (defined($fp) ?
$ua->request($hreq, $callback, 0x20000) :
# Wrap this in an eval, so that if we get signaled, we can return
# a proper response.
my $hresp;
eval {
$hresp = (defined($fp) ?
$ua->request($hreq, $callback, 0x20000) :
if ($@) {
# Bad news, we want to whine.
return GeniResponse->new(GENIRESPONSE_RPCERROR, undef, $@);
# Do this or the next call gets messed up.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment