Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Dec : Re: How to stop a Tid(Cmd)TCPServer while clients are connected?

www.cryer.info
Managed Newsgroup Archive

Re: How to stop a Tid(Cmd)TCPServer while clients are connected?

Subject:Re: How to stop a Tid(Cmd)TCPServer while clients are connected?
Posted by:"Chris Ueberall" (cuebera..@web.de)
Date:4 Dec 2007 11:37:34

Remy Lebeau (TeamB) wrote:

>
> "Chris Ueberall" <CUeberall@web.de> wrote in message
> news:47555fbf$1@newsgroups.borland.com...
>
> > I tried several methods to stop a TCPServer while a client
> > is connected, but without success, the server always hangs
> > then.
>
> Then your event handler code is likely deadlocking itself.  Are you
> performing any synchronized operations?

I used in the OnDisconnected Event the Contexts list, but because the
disconnecting raised an EIdNotConnected, which uses the Contexts too,
the deadlock occured.
Thanx for the right pointer!

--
Chris Ueberall;

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive