Default error_cb now carps, doesn't croak

Too aggresive, given that after an error we always disconnect.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
This commit is contained in:
Pedro Melo
2014-07-20 17:35:13 +01:00
parent be7b2c03d6
commit 011c7a4b82

View File

@@ -32,11 +32,9 @@ sub new {
my $self = bless(
{ hostname => hostname(),
error_cb => sub {
croak(qq{FATAL: error from host '$_[0]->{host}' port $_[0]->{port}: $_[1]});
},
connect_timeout => undef, ## use kernel default
requeue_delay => 90,
error_cb => sub { carp($_[2]) },
},
$class
);