-3

I do idHTTP.Get('http://example.com/1.zip', FStream);

A server doesn't response...and idHTTP waits for a connect to download a file

I need to stop idHTTP working. If it's connected I can do idHTTP1.Disconnect.

But what about a time when idHTTP isn't connected, when a time out is, and idHTTP waits for a connect -> we are waiting, waiting and then a time out exception will raise (I need to stop working in this waiting time). So I cannot do idHTTP1.Disconnect. If to do that then a not connected exception will raise, because of we are not connected.

How to stop working while waiting for a connect without an exception?

Thanks!

Johan
  • 74,508
  • 24
  • 191
  • 319
maxfax
  • 4,281
  • 12
  • 74
  • 120

1 Answers1

1

The maximum time for the connect operation of a TidHTTP component can be limited with the ConnectTimeout property.

mjn
  • 36,362
  • 28
  • 176
  • 378