Skip to content

Commit

Permalink
workaround "DESTROY created new reference to dead object" issue
Browse files Browse the repository at this point in the history
  • Loading branch information
clkao committed Aug 16, 2010
1 parent 5b98c6f commit ec13602
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/AnyEvent/RabbitMQ.pm
Expand Up @@ -476,8 +476,13 @@ sub drain_writes {
delete $self->{drain_timer};
}

my $is_gd;

END { $is_gd++ };

sub DESTROY {
my $self = shift;
return if $is_gd;
$self->close();
return;
}
Expand Down

0 comments on commit ec13602

Please sign in to comment.