Hi,
TFtpCli V6 truncates downloaded files.
I found that wsoNoReceiveLoop causes ASyncReceive()
to break even though there is still data pending.
When I set SocketOptions of the datasocket to []
downloads work fine.
Any idea why v5 and v6 behave so different?
Is this a possible bug in TWsocket?
Strange.
Is it totally reproductible ? Or does it occur only ocassinally ?
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be
Francois Piette wrote:
> Strange.
> Is it totally reproductible ? Or does it occur only ocassinally ?
It is totally reproducible! The FD_CLOSE message arrives far before
all data has been read causing ASyncReceive() to break the receive
loop too early.
>
> Contribute to the SSL Effort. Visit
>
Arno Garrels wrote:
> Francois Piette wrote:
>> Strange.
>> Is it totally reproductible ? Or does it occur only ocassinally ?
>
> It is totally reproducible! The FD_CLOSE message arrives far before
> all data has been read causing ASyncReceive() to break the receive
> loop too early.
I wonder why
The bug is in
procedure TCustomWSocket.ASyncReceive(
Error : Word;
MySocketOptions : TWSocketOptions);
[..]
{ DLR Honor the socket options being passed as parameters }
if HasOption(FComponentOptions, wsoNoReceiveLoop) then
break;
[..]
should be:
{ DLR Honor the socket op
Arno Garrels wrote:
> The bug is in
> procedure TCustomWSocket.ASyncReceive(
> Error : Word;
> MySocketOptions : TWSocketOptions);
> [..]
> { DLR Honor the socket options being passed as parameters }
> if HasOption(FComponentOptions, wsoNoReceiveLoop) then
> break;
>
> [..
I was a bit confused by the name MySocketOptions.
So the fix is:
procedure TCustomWSocket.ASyncReceive()
[..]
{ DLR Honor the socket options being passed as parameters }
if wsoNoReceiveLoop in MySocketOptions then
break;
[..]
Arno Garrels wrote:
> The bug is in
> procedure TCustomWSocket.AS