[
https://issues.apache.org/jira/browse/THRIFT-590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
T Jake Luciani reassigned THRIFT-590:
-------------------------------------
Assignee: Jon Schutz
> send/recv timeout values interchanged in perl socket lib
> --------------------------------------------------------
>
> Key: THRIFT-590
> URL: https://issues.apache.org/jira/browse/THRIFT-590
> Project: Thrift
> Issue Type: Bug
> Components: Library (Perl)
> Reporter: Jon Schutz
> Assignee: Jon Schutz
> Priority: Minor
>
> 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->{handle};
>
> #check for timeout
> - my @sockets = $self->{handle}->can_read( $self->{sendTimeout} / 1000 );
> + my @sockets = $self->{handle}->can_read( $self->{recvTimeout} / 1000 );
>
> 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 '.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.