Author: jfarrell
Date: Fri Sep 28 12:08:01 2012
New Revision: 1391418
URL: http://svn.apache.org/viewvc?rev=1391418&view=rev
Log:
THRIFT-1082: Thrift::FramedTransport sometimes calls close() on an undefined
value
Client: perl
Patch: John Siracusa
Fixes Thrift::FramedTransport module sometimes ends up calling the close()
method on an undefined value inside its own close()
Modified:
thrift/trunk/lib/perl/lib/Thrift/FramedTransport.pm
Modified: thrift/trunk/lib/perl/lib/Thrift/FramedTransport.pm
URL:
http://svn.apache.org/viewvc/thrift/trunk/lib/perl/lib/Thrift/FramedTransport.pm?rev=1391418&r1=1391417&r2=1391418&view=diff
==============================================================================
--- thrift/trunk/lib/perl/lib/Thrift/FramedTransport.pm (original)
+++ thrift/trunk/lib/perl/lib/Thrift/FramedTransport.pm Fri Sep 28 12:08:01 2012
@@ -68,7 +68,9 @@ sub close
{
my $self = shift;
- $self->{transport}->close();
+ if (defined $self->{transport}) {
+ $self->{transport}->close();
+ }
}
#