Arnold FLUTEAUX wrote:
> Indeed, Requestdone triggers but once time, the connected property is
> set to true.
> If I try to launch again a getasync command without reconnection, at
> this time I have an error and the Connected property is set to False.
> And side server, I launch FTPServer.disconnect property and the
> client is disconnected.

Nothing can be done at the same time ;-) 
So component behaviour is perfectly OK.
1) - Data connection is closed, RequestDone triggers, property Connected
is still TRUE.
2) - Control connection is closed, OnSessionClosed triggers, property 
Connected is now FALSE.  

Note that in order to make number 2 happen messages need to be
processed after number 1! But _never call ProcessMessages in RequestDone
or any other event handler. Instead you could post a custom message from
inside RequestDone and from the message handler check property Connected
again and decide what to do next.


> 
> What is curious is that in debug mode, if I make a pause, the
> connected property set to false.
> It's like if an event hadn't yet finished.
> 
> 
> 
> Arnold FLUTEAUX wrote:
>> Thanks for your response.
>> I test it but when I cut on the connection with server during a
>> download, a requestdone triggers but not the sessionclosed.
> 
> Event OnSessionClosed is only triggered when the control connection
> closes. When data connection closes only OnRequestDone fires.
> So, in your case the server did not close the control connection,
> you may probably start subsequent transfers without reconnect first.
> 
> ---
> Arno Garrels [TeamICS]
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to