Permalink
Browse files

workaround "DESTROY created new reference to dead object" issue

  • Loading branch information...
clkao committed Aug 16, 2010
1 parent 5b98c6f commit ec13602e3bb4d676f750a22e659bc8aedc09f16f
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/AnyEvent/RabbitMQ.pm
View
@@ -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;
}

0 comments on commit ec13602

Please sign in to comment.