Proper way to close an application containing TIdHTTPServer?

Giganews Newsgroups
Subject: Proper way to close an application containing TIdHTTPServer?
Posted by:  Andrew Fiddian-Green (…@dd)
Date: Tue, 12 Jul 2005

What is the proper way to close an application containing an HTTP Server so
that existing connections will be closed gently before the application
terminates? (i.e. to avoid exceptions in the server and in the clients). I
suppose that in MainForm OnCloseQuery one could set the server active :=
false and then wait until all threads are done. => But how can I know when
all the threads are done?

Regards,
AndrewFG

Replies