the TFpHttpClient has an IoTimeout property, which in turn sets the IOTimeout of its FSocket (TInetSocket), however there's no way to set a connection timeout. I see that even overriding the SocketHandler wouldn't change that, since it's connect is only called *after* the fpconnect call succeeds.
Also, I see no way to interrupt a pending connect from another thread.

My problem is that I'm using it in a thread, and, when I terminate the application, in case the host is not responding/not available, I have to wait the roughly 30 seconds that it takes for the connect to timeout.

I had the same problem with synapse, but there it has been solved several years ago by introducing a connection timeout (besides, I can abort a socket operation from another thread, though it only works under windows).


fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org

Reply via email to