Re: Net::FTP, GET transfers only a part of a file
- From: jussi.mononen-asdf@xxxxxxxxxxxxxxxx
- Date: Thu, 29 Sep 2005 12:32:50 +0000 (UTC)
>> Why GET reads only a part of the file? After the first
>> read data packet, GET returns OK and my script continues,
>> and eventually hangs waiting for the response of PWD.
>
> get-function return value seems to be 0 (zero) ?
>
> It should return either 'local' or undef??
Problem solved.
For experimental reasons I had defined FTP Timeout to zero.
What I didn't know was that the same timeout was used in I.pm
read functions select-function call as a timeout also.
When the data sent from the remote had enough delay, select
would timeout and I.pm would call 'carp'.
As it was, I was executing 'get' inside an eval-block and
was able to caught this one. The only problem was that I
had relied on Net::FTP documentation and only checked that
the return value was defined. After calling 'carp' get
returned zero and halted file transfer. As my script proceeded
I sent the 'pwd' command falling into the deadloc I described
earlier.
Now I would like to ask whether the connection timeout should
be used in rea-timeouts also if zero is a valid value?
br,
Jussi Mononen
--
remove -asdf and asdf- for email address
.
- References:
- Net::FTP, GET transfers only a part of a file
- From: jussi . mononen-asdf
- Re: Net::FTP, GET transfers only a part of a file
- From: jussi . mononen-asdf
- Net::FTP, GET transfers only a part of a file
- Prev by Date: Re: what modules best for communicationg with a UART with cygwin
- Next by Date: installing modules?
- Previous by thread: Re: Net::FTP, GET transfers only a part of a file
- Next by thread: installing modules?
- Index(es):
Relevant Pages
|
|