Skip to content

Commit

Permalink
remove this self-canceling numerical operation
Browse files Browse the repository at this point in the history
millisecond timeout were used in the XS implementation, but not that we
removed the XS implementation, we do not need to scale the value of
read_timeout for it.
  • Loading branch information
gugod committed Dec 22, 2013
1 parent 94fa9b8 commit 0fd37cf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Hijk.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ sub fetch {
my ($fd, $read_timeout,$block_size,$header,$head) = (shift,shift,10240,{},"");
my ($body,$buf,$decapitated,$nfound,$nbytes,$proto);
my $status_code = 0;
$read_timeout /= 1000 if defined $read_timeout;
vec(my $rin = '', $fd, 1) = 1;
do {
if ($read_timeout) {
Expand Down Expand Up @@ -146,7 +145,7 @@ sub request {
}

my ($proto,$status,$body,$head,$error) = eval {
fetch(fileno($soc), (($args->{read_timeout} || 0) * 1000));
fetch(fileno($soc), $args->{read_timeout});
} or do {
my $err = $@ || "zombie error";
delete $args->{socket_cache}->{$cache_key} if defined $cache_key;
Expand Down

0 comments on commit 0fd37cf

Please sign in to comment.