Re: Net::FTP, GET transfers only a part of a file



>> 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

.



Relevant Pages

  • Re: [take24 0/6] kevent: Generic event handling mechanism.
    ... Usually this is done with a *_wait call with a timeout of zero. ... thread itself does not sleep and can process events), ... This would be useful to implement functionality at userlevel and still use an event queue to announce the availability. ...
    (Linux-Kernel)
  • [WATCHDOG] v2.6.25 watchdog fix
    ... it8712f_wdt Zero MSB timeout byte when disabling watchdog ... but the normal timeout value is set to zero, so the MSB should ...
    (Linux-Kernel)
  • Re: Play. The. Game.
    ... Drop the round time limit to 1 ... going to get zero VP for lasting to the end, I might as well get zero VP ... really is the timeout, currently. ... I think I have never tied for a final so I would go for the 0,5VP + minor risk loosing the final tie all the time instead of the unlikely 1VP (We are talking about sitatuations where obtaining a VP is like a 10% chance, if there is any real chance I would go for it anyway). ...
    (rec.games.trading-cards.jyhad)
  • [PATCH] [WATCHDOG] it8712f_wdt Zero MSB timeout byte when disabling watchdog
    ... If the chip revision is>= 8, set MSB of the 16-bit timeout value to zero ... [WATCHDOG] it8712f_wdt Zero MSB timeout byte when disabling watchdog ...
    (Linux-Kernel)
  • Re: Play. The. Game.
    ... Drop the round time limit to 1 ... Would just removing the 0.5 timeout VP ... this might encourage more aggressive play - if I'm ... going to get zero VP for lasting to the end, I might as well get zero VP ...
    (rec.games.trading-cards.jyhad)