From 011c7a4b821f9b0561693b0d05170d5a0de59102 Mon Sep 17 00:00:00 2001 From: Pedro Melo Date: Sun, 20 Jul 2014 17:35:13 +0100 Subject: [PATCH] Default error_cb now carps, doesn't croak Too aggresive, given that after an error we always disconnect. Signed-off-by: Pedro Melo --- lib/AnyEvent/NSQ/Connection.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/AnyEvent/NSQ/Connection.pm b/lib/AnyEvent/NSQ/Connection.pm index 099b036..536552b 100644 --- a/lib/AnyEvent/NSQ/Connection.pm +++ b/lib/AnyEvent/NSQ/Connection.pm @@ -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 );