Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Oct : Re: TIdTCPServer not shutting down

www.cryer.info
Managed Newsgroup Archive

Re: TIdTCPServer not shutting down

Subject:Re: TIdTCPServer not shutting down
Posted by:"Jamie Dale" (j.da..@turboz.net)
Date:Wed, 4 Oct 2006 22:42:33

"Roberto Meneghini" <rmeneghini@separationsystems.com> wrote in message
news:45241979@newsgroups.borland.com...
> Hello,
> I'm writing a Client/Server application using INDY10 for Delphi.NET. I've
> noticed (using the Task Manager) that if I close the server application
> while a client is still connected, the server process stays loaded.

Sounds like it is probably because you still have a client using an active
thread. I don't know if Indy disconnects clients automatically - Remy will
certainly know though.

> However, this does not happen if the client(s) disconnect before closing
> the server.

Reinforces what I said above.. I think

> My guess is that a thread is still active.

Probably - it would make sense..

> Is there a way to force the server to shutdown all the active connections.

Yes, go through the ThreadList and disconnect them all one by one. Basically
loop through it.

> I have tried setting the active property to false, but it did not work.

Got a funny feeling that doesn't actually work until they are all
disconnected. As I say, Remy will know more.

J

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive