The underlying Perl library expects timeouts in seconds, but the
documentation for the Thrift classes says the should be in milliseconds.
This changes divides timeouts by 1000 to make that the case.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665585
13f79535-47bb-0310-9956-
ffa450edef68
{
my $self = shift;
- my $ua = LWP::UserAgent->new('timeout' => $self->{sendTimeout},
+ my $ua = LWP::UserAgent->new('timeout' => ($self->{sendTimeout} / 1000),
'agent' => 'Perl/THttpClient'
);
$ua->default_header('Accept' => 'application/x-thrift');
while (1) {
#check for timeout
- my @sockets = $self->{handle}->can_read( $self->{recvTimeout} );
+ my @sockets = $self->{handle}->can_read( $self->{recvTimeout} / 1000 );
if(@sockets == 0){
die new Thrift::TException('TSocket: timed out reading '.$len.' bytes from '.
my $len = shift;
#check for timeout
- my @sockets = $self->{handle}->can_read( $self->{sendTimeout} );
+ my @sockets = $self->{handle}->can_read( $self->{sendTimeout} / 1000 );
if(@sockets == 0){
die new Thrift::TException('TSocket: timed out reading '.$len.' bytes from '.
#check for timeout
- my @sockets = $self->{handle}->can_write( $self->{recvTimeout} );
+ my @sockets = $self->{handle}->can_write( $self->{recvTimeout} / 1000 );
if(@sockets == 0){
die new Thrift::TException('TSocket: timed out writing to bytes from '.