title: How to set TIdHTTP time-out?
body: <p>In Delphi XE2, when using <code>TIdHTTP.Get</code>, how can I set the connection time-out? (For example, to time-out when the computer is not physically connected to the Internet). I have tried to set the connection time-out with the <code>ConnectTimeout</code> and <code>ReadTimeout</code> TIdHTTP properties, but it does not work:</p>
  
  <pre><code>procedure TForm1.btnGetClick(Sender: TObject);
  var
    S: string;
  begin
    IdHTTP1.ConnectTimeout := 3000;
    IdHTTP1.ReadTimeout := 3000;
  
    S := IdHTTP1.Get('http://www.mywebsite.com/program_version.txt');
    lbl1.Caption := S;
  end;
  </code></pre>
  
  <p>Using this code, always after EXACTLY <strong>21 seconds</strong> (!) the message dialog "Connect timed out" is displayed (when the computer is not physically connected to the Internet).</p>
  
  <p>So, how can I set the IdHTTP connection time-out? Also, NO DIALOG should be displayed at time-out, but an event should be fired, so I can make my own time-out event handling.</p>
  
  <p>And more generally, how can I detect whether there is no PHYSICAL Internet connection? In this case I wouldn't have to connect at all and save the time-out time (for example, when checking the newest program version online at program start).</p>
  
  <p>Indy version: 10.5.8.0</p>