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!