Try not to die inside Mojo::Reactor::Poll if some incorrect data lands in update

This commit is contained in:
eleksir
2021-04-22 18:07:39 +03:00
parent f7634a26d1
commit e7ef39366b

View File

@@ -448,7 +448,15 @@ sub _process_message {
foreach my $listener (@{ $self->listeners }) {
# call the listener code, supplying ourself and the update
$listener->($self, $update);
my $evalRet = eval {
$listener->($self, $update);
return 1;
};
unless ($evalRet) {
cluck "An error occured during update processing: $EVAL_ERROR";
return;
}
}
return;