Skip Menu |

This queue is for tickets about the AnyEvent-RabbitMQ CPAN distribution.

Report information
The Basics
Id: 83768
Status: resolved
Priority: 0/
Queue: AnyEvent-RabbitMQ

People
Owner: DLAMBLEY [...] cpan.org
Requestors: DLAMBLEY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.09
Fixed in: (no value)



Subject: Callback on close broken in 1.09
The on_success callback when you call ->close was broken in 192b417742ed52ae1656dec325e46059f74d30bb This commit fixes it, https://github.com/davel/AnyEvent- RabbitMQ/commit/cc0dbc39434bcbedf239654a7ca0d1dee1d12180
Subject: anyevent.patch
commit cc0dbc39434bcbedf239654a7ca0d1dee1d12180 Author: Dave Lambley <davel@state51.co.uk> Date: Tue Mar 5 14:49:10 2013 +0000 Ensure the on_success handler gets called on close if there are no channels. diff --git a/lib/AnyEvent/RabbitMQ.pm b/lib/AnyEvent/RabbitMQ.pm index eacc7a4..18cd054 100644 --- a/lib/AnyEvent/RabbitMQ.pm +++ b/lib/AnyEvent/RabbitMQ.pm @@ -350,6 +350,11 @@ sub close { } ); }; + + if (scalar(keys %{ $self->{_channels} })==0) { + $args{on_success}->(@_); + } + for my $id (keys %{$self->{_channels}}) { my $channel = $self->{_channels}->{$id} or next; # Could have already gone away on global destruction..
On Tue Mar 05 09:53:18 2013, DLAMBLEY wrote: Show quoted text
> The on_success callback when you call ->close was broken in > > 192b417742ed52ae1656dec325e46059f74d30bb > > This commit fixes it, > > https://github.com/davel/AnyEvent- > RabbitMQ/commit/cc0dbc39434bcbedf239654a7ca0d1dee1d12180
Fixed in https://github.com/bobtfish/AnyEvent-RabbitMQ/commit/cc0dbc39434bcbedf239654a7ca0d1dee1d12180