The same problem happens with THttpCli as well. It simply calls
OnRequestDone twice under some conditions. To prevent this, I have had to
override the component SetReady() method. Otherwise, if you postmessage from
the first call, the second one could still arrive later than the posted
message!! And of course you are unable to wait for the second call to
OnRequestDone as that sometimes never happens!!

Regards,

SZ

On Mon, Oct 12, 2009 at 2:06 PM, Max Terentiev <maxterent...@mail.ru> wrote:

> Hi,
>
> What is proper way to abort Smtp connection
> in case of timeout ?
>
> SmtpCli.CtrlSocket.Close or CloseDelayed ?
>
> I ask because I notice strange problem with OnRequestDone
> event:
>
> Some times after calling SmtpCli->Abort and attempting to
> establish new connection I receive OnRequestDone for previous
> aborted connection. It's happens rarely and randomly.
>
> So, after aborting connection in case of timeout and starting
> new connection I must be sure what OnRequestDone will be
> fired only for new connection !
>
> I not call Application.ProcessMessages inside SmtpCli events
> handlers.
>
> ---
> With best regards, Max Terentiev.
> Business Software Products.
> AMS Development Team.
> supp...@bspdev.com
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to