Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Patch Available
Description
In current version of code, sendTimeout is used in read() and recvTimeout is used in write(). Should be the other way around.
Simple fix:
Index: lib/perl/lib/Thrift/Socket.pm
===================================================================
— lib/perl/lib/Thrift/Socket.pm (revision 818395)
+++ lib/perl/lib/Thrift/Socket.pm (working copy)
@@ -196,7 +196,7 @@
return unless defined $self->
#check for timeout
- my @sockets = $self->{handle}
>can_read( $self>
+ my @sockets = $self->{handle}
if(@sockets == 0){
die new Thrift::TException('TSocket: timed out reading '.$len.' bytes from '.
@@ -236,7 +236,7 @@
#check for timeout
- my @sockets = $self->{handle}->can_write( $self->{recvTimeout} / 1000 );
+ my @sockets = $self->{handle}->can_write( $self->{sendTimeout}
/ 1000 );
if(@sockets == 0){
die new Thrift::TException('TSocket: timed out writing to bytes from '.