[libanyevent-rabbitmq-perl] 102/151: revert 8cc40abc22ae0fd1e1b8aec01a0f68f69f90ba61 which breaks tests

Damyan Ivanov dmn at moszumanska.debian.org
Thu Jan 16 11:03:08 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 a0bc123a09b585b960a6c466ef51d44effc0a121
Author: Tomas Doran <bobtfish at bobtfish.net>
Date:   Tue Aug 21 15:20:38 2012 +0200

    revert 8cc40abc22ae0fd1e1b8aec01a0f68f69f90ba61 which breaks tests
---
 Changes                  | 9 +++------
 lib/AnyEvent/RabbitMQ.pm | 7 ++++---
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/Changes b/Changes
index 20649b9..4acad69 100644
--- a/Changes
+++ b/Changes
@@ -1,15 +1,12 @@
 Revision history for Perl extension AnyEvent::RabbitMQ
 
-        - Fix that fact that the AMQP server can ask us to close the
-          connection - we should respond with CloseOk and then
-          not say anything further otherwise we get a SIGPIPE.
-
+1.06    Tue Aug 21 15:10:00 2012
         - Fix a race condition stopping connections from closing properly.
           If you ask to open a channel, and then immediately try to close
           the connection then the not yet open channel would never remove
           itself from the associated connection, resulting in the connection
-          never being terminated (as there were still channels associated with
-          it).
+          never being terminated (as there were still channels associated
+          with it).
 
         - Stop leaking all RabbitMQ messages recieved back inside
           a closure.
diff --git a/lib/AnyEvent/RabbitMQ.pm b/lib/AnyEvent/RabbitMQ.pm
index ed7d78a..b00e421 100644
--- a/lib/AnyEvent/RabbitMQ.pm
+++ b/lib/AnyEvent/RabbitMQ.pm
@@ -188,10 +188,11 @@ sub _check_close_and_clean {
     my ($frame, $close_cb,) = @_;
 
     return 1 if !$frame->isa('Net::AMQP::Frame::Method');
+
     my $method_frame = $frame->method_frame;
-    return 1 if !$method_frame->isa('Net::AMQP::Protocol::Connection::Close') && !$method_frame->isa('Net::AMQP::Protocol::Connection::CloseOk');
-    $self->_push_write(Net::AMQP::Protocol::Connection::CloseOk->new())
-        if $method_frame->isa('Net::AMQP::Protocol::Connection::Close');
+    return 1 if !$method_frame->isa('Net::AMQP::Protocol::Connection::Close');
+
+    $self->_push_write(Net::AMQP::Protocol::Connection::CloseOk->new());
     $self->{_channels} = {};
     $self->{_is_open} = 0;
     $self->_disconnect();

-- 
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