Subject: | Thrift::FramedTransport sometimes calls close() on an undefined value |
The Thrift::FramedTransport module sometimes ends up calling the close() method on an
undefined value inside its own close() method during global destruction. Events during global
destruction are unordered, so it's difficult to reproduce this bug, but it does happen, producing
error messages like this:
(in cleanup) Can't call method "close" on an undefined value at
/usr/lib/perl5/vendor_perl/5.8.8/Thrift/FramedTransport.pm line 72 during global destruction.
The attached patch is a simple workaround to the problem.
Subject: | FramedTransport.patch |
--- lib/Thrift/FramedTransport.pm 2011-03-03 10:43:46.000000000 -0500
+++ lib/Thrift/FramedTransport.pm.orig 2011-03-03 10:40:00.000000000 -0500
@@ -69,7 +69,7 @@
{
my $self = shift;
- $self->{transport}->close() if (defined $self->{transport});
+ $self->{transport}->close();
}
#