Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: Indy SSL error
| Subject: | Re: Indy SSL error |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Mon, 15 May 2006 11:05:38 |
"Koger" <ingen@mail.dk> wrote in message
news:xn0em93x9s4o5000@newsgroups.borland.com...
> AFAIK these problems are releated to deadlocking, which isn't the
> problem here.
It doesn't matter. Letting the TThread destructor call Terminate() and
WaitFor() has a lot of problems. Never rely on that behavior!
> Please look at my code again.
You are doing everything in your thread's destructor, which is not a good
place to do it. Please re-read my earlier comments. You should be
disconnecting and terminating the thread BEFORE freeing it. The code I gave
you does that.
> then WAIT for the thread to terminate (by inheriting the destructor)
Do not do that!
Gambit