--- SSL.pm.1396971177.bak 2014-03-07 22:07:51.000000000 +0200 +++ SSL.pm 2014-11-29 12:16:16.000000000 +0200 @@ -261,6 +261,10 @@ if $params->{blockbadclientcert}; Net::SSLeay::set_verify($self->{ssl}, $orfilter, \&VERIFY); } + + if (ref $params->{FailureEvent} eq 'ARRAY') { + $self->{FailureEvent} = $params->{FailureEvent}; + } $globalinfos = [0, 0, []]; @@ -428,6 +432,8 @@ carp("POE::Filter::SSL: UNEXPECTED ERROR: ERR1:".$err." ERR2:".$err2.($self->{client} ? '' : " HINT: ". "Check if you have configured a CRT and KEY file, and that ". "both are readable")); # unless ($err2 == 5); # SSL_ERROR_SYSCALL + $self->{unexpected_error} = 1; + $poe_kernel->call(@{$self->{FailureEvent}}, sprintf("POE::Filter::SSL: UNEXPECTED ERROR: ERR1:%s ERR2:%s%s", $err, $err2, ($self->{client} ? '' : ' HINT: Check if you have configured a CRT and KEY file, and that both are readable'))) if $self->{FailureEvent}; $ret++ unless $self->{accepted}++; return $ret; }