Changeset 354
- Timestamp:
- 08/17/06 07:50:15 (2 years ago)
- Files:
-
- trunk/api/perl/MogileFS.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/api/perl/MogileFS.pm
r351 r354 27 27 use LWP::UserAgent; 28 28 use fields qw(root domain backend readonly); 29 use Time::HiRes (); 29 30 30 31 our $AUTOLOAD; … … 1359 1360 # nope, we have to read a line 1360 1361 my $nfound; 1362 my $t1 = Time::HiRes::time(); 1361 1363 while ($nfound = select($rin, undef, undef, 3)) { 1362 1364 my $data; … … 1376 1378 1377 1379 # and if we got no data, it's time to return EOF 1378 return undef unless $bytesin; 1380 unless ($bytesin) { 1381 $@ = "\$bytesin is 0"; 1382 return undef; 1383 } 1379 1384 } 1380 1385 1381 1386 # if we got here, nothing was readable in our time limit 1387 my $t2 = Time::HiRes::time(); 1388 $@ = sprintf("not readable in %0.02f seconds", $t2-$t1); 1382 1389 return undef; 1383 1390 } … … 1499 1506 my $line = $self->_getline; 1500 1507 1501 return $err->("Unable to read response line from server ($self->{sock}) ")1508 return $err->("Unable to read response line from server ($self->{sock}) after PUT of $self->{length} to $self->{uri}. _getline says: $@") 1502 1509 unless defined $line; 1503 1510
