Skip to content

Commit

Permalink
fix skipping stacktrace
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Jan 15, 2025
1 parent 3e4f425 commit 77aa01f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/Thruk.pm
Original file line number Diff line number Diff line change
Expand Up @@ -564,17 +564,17 @@ sub _check_exit_reason {
return;
}

local $| = 1;
my $c = $Thruk::Globals::c;
my $url = $c->req->url;

my $params = ($c->req->parameters and scalar keys %{$c->req->parameters} > 0) ? Thruk::Utils::dump_params($c->req->parameters) : undef;
if($params =~ m|Thruk::Utils::Cluster::pong|mx) {
if(!defined $Thruk::Globals::c) {
# not processing any request right now -> simply exit
return;
}

if(!defined $Thruk::Globals::c) {
# not processing any request right now -> simply exit
local $| = 1;
my $c = $Thruk::Globals::c;
my $url = $c->req ? $c->req->url : '<no url>';

my $params = ($c->req && $c->req->parameters && scalar keys %{$c->req->parameters} > 0) ? Thruk::Utils::dump_params($c->req->parameters) : undef;
if($params =~ m|Thruk::Utils::Cluster::pong|mx) {
return;
}

Expand Down

0 comments on commit 77aa01f

Please sign in to comment.