Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Nov : Safely calling TidHTTPServer.active := false
| Subject: | Safely calling TidHTTPServer.active := false |
| Posted by: | "Eric Carlson" (dont-spam-me@nospamplease.com) |
| Date: | Tue, 1 Nov 2005 12:00:13 |
Indy 9/D7 Ent
I have a service with a TidHTTPServer which I need to deactivate when a
certain message arrives. This handler just calls HTTPServer.Active := false;
but I am getting occasional IdThreadTimeout exceptions, I'm presuming
because I make this call in the middle of serving a request. If thats
correct I'd like to wait until the requests are served, iow stop serving new
ones and wait until current ones complete. What should I be testing for to
achieve this please? Thanks.