TIdAntiFreeze not working?

Giganews Newsgroups
Subject: TIdAntiFreeze not working?
Posted by:  Joe Cocker (j…@cocker.com)
Date: Fri, 22 Aug 2003

I'm using Indy 9.0.11, and I have an application that
creates a TIdHTTP object at runtime (not sure if it's
related). I also have a TIdAntiFreeze component on the
main form.

My users have complained for a long time that my
application tends to freeze, but I was never able to
reproduce it, until today! I discovered that the freeze
happens when the computer is connected to the network
(has a TCP connection), but cannot access the Internet
(the router is not connected or turned off).

Using the debugger, I have found the exact position of
the freeze: the "Connect(ReadTimeout)" statement under
CheckAndConnect() in IdHTTP.pas (line 790).

To test it, I have moved the HTTP call from my
application to a new thread. This healed the freezes
completely! Hence my doubt that IdAntiFreeze might not
be working correctly...

Isn't the AntiFreeze component supposed to solve this
situation? Should I do anything else besides dropping
it on the main form? I have also tried to play with its
properties, but nothing seems to fix it.

Thanks for your help! :-)