Fix IOLoop crashes caused by using log->warning instead of log->warn
The issue manifested itself by the ioloop using 100%cpu without making any progress.
This commit is contained in:
parent
263fe6da63
commit
243302b9bb
1 changed files with 4 additions and 4 deletions
|
@ -1623,7 +1623,7 @@ sub startup {
|
||||||
my ( $self, %opt ) = @_;
|
my ( $self, %opt ) = @_;
|
||||||
|
|
||||||
if ( $opt{cancelled} ) {
|
if ( $opt{cancelled} ) {
|
||||||
$self->app->log->warning(
|
$self->app->log->warn(
|
||||||
'get_journey_stats called with illegal option cancelled => 1'
|
'get_journey_stats called with illegal option cancelled => 1'
|
||||||
);
|
);
|
||||||
return {};
|
return {};
|
||||||
|
@ -2005,7 +2005,7 @@ sub startup {
|
||||||
)->catch(
|
)->catch(
|
||||||
sub {
|
sub {
|
||||||
my ($err) = @_;
|
my ($err) = @_;
|
||||||
$self->app->log->warning("get($url): $err");
|
$self->app->log->warn("get($url): $err");
|
||||||
$promise->reject($err);
|
$promise->reject($err);
|
||||||
}
|
}
|
||||||
)->wait;
|
)->wait;
|
||||||
|
@ -2041,7 +2041,7 @@ sub startup {
|
||||||
$body =~ s{<SDay [^>]*/>}{}s;
|
$body =~ s{<SDay [^>]*/>}{}s;
|
||||||
eval { $tree = XML::LibXML->load_xml( string => $body ) };
|
eval { $tree = XML::LibXML->load_xml( string => $body ) };
|
||||||
if ($@) {
|
if ($@) {
|
||||||
$self->app->log->warning("load_xml($url): $@");
|
$self->app->log->warn("load_xml($url): $@");
|
||||||
$cache->freeze( $url, $traininfo );
|
$cache->freeze( $url, $traininfo );
|
||||||
$promise->resolve($traininfo);
|
$promise->resolve($traininfo);
|
||||||
return;
|
return;
|
||||||
|
@ -2078,7 +2078,7 @@ sub startup {
|
||||||
)->catch(
|
)->catch(
|
||||||
sub {
|
sub {
|
||||||
my ($err) = @_;
|
my ($err) = @_;
|
||||||
$self->app->log->warning("get($url): $err");
|
$self->app->log->warn("get($url): $err");
|
||||||
$promise->reject($err);
|
$promise->reject($err);
|
||||||
}
|
}
|
||||||
)->wait;
|
)->wait;
|
||||||
|
|
Loading…
Reference in a new issue