[libanyevent-rabbitmq-perl] 58/151: Fix another case where we would never return.

Damyan Ivanov dmn at moszumanska.debian.org
Thu Jan 16 11:03:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

dmn pushed a commit to annotated tag debian/1.12-1
in repository libanyevent-rabbitmq-perl.

commit 59eb2aa55168ee9a53a7f1a410223b7597919786
Author: Tomas Doran <bobtfish at bobtfish.net>
Date:   Thu Jun 10 16:08:25 2010 +0100

    Fix another case where we would never return.
    
    If for some reason connecting to the RabbitMQ server breaks part way through,
    then we would never call the rouse cb.
    
    With this change we do call that callback and ergo we don't wait forever
    for a connection that we know is broken.
---
 lib/AnyEvent/RabbitMQ.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/AnyEvent/RabbitMQ.pm b/lib/AnyEvent/RabbitMQ.pm
index ea2087d..98160fe 100644
--- a/lib/AnyEvent/RabbitMQ.pm
+++ b/lib/AnyEvent/RabbitMQ.pm
@@ -76,6 +76,9 @@ sub connect {
                     my ($handle, $fatal, $message) = @_;
 
                     $self->{_channels} = {};
+                    if (!$self->{_is_open}) {
+                        $args{on_failure}->(@_);
+                    }
                     $self->{_is_open} = 0;
                     $self->_disconnect();
                     $args{on_close}->($message);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libanyevent-rabbitmq-perl.git



More information about the Pkg-perl-cvs-commits mailing list