[libanyevent-rabbitmq-perl] 52/151: Close needs to fire the callback.
Damyan Ivanov
dmn at moszumanska.debian.org
Thu Jan 16 11:03:03 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 04e179275964436b16b0b1bbe553f54dc0fca29d
Author: Tomas Doran <bobtfish at bobtfish.net>
Date: Thu May 27 16:22:25 2010 +0100
Close needs to fire the callback.
Otherwise the Coro::rouse_wait thing is never triggered, ergo we wait
forever and ever and ever.
---
Changes | 2 ++
lib/AnyEvent/RabbitMQ.pm | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Changes b/Changes
index 18dd92b..0867561 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,8 @@ Revision history for Perl extension RabbitFoot
- Fix errors in global destruction due to destruction order being
random.
+ - Fix bug if you call ->close on a Net::RabbitFoot instance which
+ is not already connected. Previously this would never return.
1.01 Sun Mar 18 07:21:58 2010
- fix bugs.
diff --git a/lib/AnyEvent/RabbitMQ.pm b/lib/AnyEvent/RabbitMQ.pm
index 1319dfc..f633ff5 100644
--- a/lib/AnyEvent/RabbitMQ.pm
+++ b/lib/AnyEvent/RabbitMQ.pm
@@ -260,7 +260,10 @@ sub close {
my $self = shift;
my %args = $self->_set_cbs(@_);
- return $self if !$self->{_is_open};
+ if (!$self->{_is_open}) {
+ $args{on_success}->(@_);
+ return $self;
+ }
my $close_cb = sub {
$self->_close(
--
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