3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 05:49:27 +01:00

EventDispatcher: no longer remove handlers on error

This commit is contained in:
Pragmatic Software 2020-02-02 15:00:30 -08:00
parent 68994f0d8b
commit b89d41796f

View File

@ -52,8 +52,8 @@ sub dispatch_event {
if ($@) {
chomp $@;
$self->{pbot}->{logger}->log("Error in event handler: $@\n");
$self->{pbot}->{logger}->log("Removing handler.\n");
splice @{$self->{handlers}->{$event_type}}, $i--, 1;
#$self->{pbot}->{logger}->log("Removing handler.\n");
#splice @{$self->{handlers}->{$event_type}}, $i--, 1;
}
return $ret if $ret;
@ -72,8 +72,8 @@ sub dispatch_event {
if ($@) {
chomp $@;
$self->{pbot}->{logger}->log("Error in event handler: $@\n");
$self->{pbot}->{logger}->log("Removing handler.\n");
splice @{$self->{handlers}->{any}}, $i--, 1;
#$self->{pbot}->{logger}->log("Removing handler.\n");
#splice @{$self->{handlers}->{any}}, $i--, 1;
}
return $ret if $ret;