[libanyevent-rabbitmq-perl] 39/151: Fixed a callback process for disconnection.
Damyan Ivanov
dmn at moszumanska.debian.org
Thu Jan 16 11:03:02 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 e5e912e22f333e207cda38ba68872c80883f26ec
Author: cooldaemon <cooldaemon at gmail.com>
Date: Wed Mar 10 23:41:44 2010 +0900
Fixed a callback process for disconnection.
---
lib/AnyEvent/RabbitMQ.pm | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/lib/AnyEvent/RabbitMQ.pm b/lib/AnyEvent/RabbitMQ.pm
index 53c205b..1f81c98 100644
--- a/lib/AnyEvent/RabbitMQ.pm
+++ b/lib/AnyEvent/RabbitMQ.pm
@@ -72,9 +72,11 @@ sub connect {
fh => $fh,
on_error => sub {
my ($handle, $fatal, $message) = @_;
- delete $self->{_handle};
- $args{on_failure}->($message);
- }
+
+ $self->{_is_open} = 0;
+ $self->_disconnect();
+ $args{on_close}->($message);
+ },
);
$self->_read_loop($args{on_close}, $args{on_read_failure});
$self->_start(%args,);
@@ -119,12 +121,8 @@ sub _read_loop {
}
my $id = $frame->channel;
- return if !$self->_check_close_and_clean(
- $frame, $close_cb, $failure_cb, $id,
- );
-
if (0 == $id) {
- return if !$self->_check_close_and_clean($frame, $close_cb, $id,);
+ return if !$self->_check_close_and_clean($frame, $close_cb,);
$self->{_queue}->push($frame);
} else {
my $channel = $self->{_channels}->{$id};
@@ -145,7 +143,7 @@ sub _read_loop {
sub _check_close_and_clean {
my $self = shift;
- my ($frame, $close_cb, $id,) = @_;
+ my ($frame, $close_cb,) = @_;
return 1 if !$frame->isa('Net::AMQP::Frame::Method');
--
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