Newbie:Connection Time Out Value

Giganews Newsgroups
Subject: Newbie:Connection Time Out Value
Posted by:  Sümer (sume…@gmail.com)
Date: Fri, 8 Jul 2005

Here is my code to control, let's say Automatic Update process for my
program.The code works well, but sometimes I get Connection Time Out
error.When I got the error, I tried to open the page with my browser and
after a while, the page opened.So, I think the problem is the TimeOut Value
of the TIdhttp because the browser itself had a longer timeout value(I don't
know if I am right).Is there a way to change the timeout value?

[code]
procedure TUpdateThread.Execute;
var
  updateServer: TIdHTTp;
  pVersion: string;
begin
  try
    try
      updateServer := TIdHTTP.Create(nil);
      if fUseProxy then
      begin
      updateServer.ProxyParams.ProxyServer := fProxyAddress;
      updateServer.ProxyParams.ProxyPort := fProxyPort;
      end;
      pVersion :=
updateServer.Get('http:/www.myserver.com/latest_version.txt');
      if pVersion = PROGRAM_VERSION then
        Synchronize(NoNewVersion)
      else
      begin
        Synchronize(NewVersionExists);
      end
    except
      Synchronize(ConnError);
    end;
  finally
    Synchronize(UpdateStatusBar);
  end;
end;
[.code]

Regards...

Replies