I would like to ask for a tiny help, because I do not know ICS well enough yet to find a solution for this... 👼
I've switched from Indy to ISC a few weeks ago. It runs only on a few PCs yet so I can test it's durability.
But it's not stable enough yet, because sometimes, when the server is temporary overloaded I experience a strange behaviour:
(By "sometimes" I mean after a few days of run. So I can not debug it, only read the logs of clients on remote PCs.)
1. failing attempt:
httpGET: Error #8 -- Request aborted on timeout
2. attempt: (after 20 sec)
0 byte answer, no error msg.
3., 4., 5., ... all the attempts after that:
httpGET: Status #404 -- Cannot change SocketFamily when not closed or in DNS lookup
httpGET: Status #404 -- Cannot change SocketFamily when not closed or in DNS lookup
httpGET: Status #404 -- Cannot change SocketFamily when not closed or in DNS lookup
... forever
... and the only way I can fix it, by restarting the program.
Here I've shared my code using TSslHttpCli before:
I was told not to destroy and recreate ICS component every each time before using it, like I did with Indy.
But in that case:
Why ICS does not reset itself / the socket, after first (timeout) error ?
Do I have to create: some kind of "onTimeout" function for it manually, and close the socket myself?
(I'm guessing that the socket is still open, and that's why it's causing trouble to re-connect. Right?)
Why does my function's Result is True after such error, while the "error" text is clearly showing there was a big problem with the request?
(The only case this can happen, if Statuscode is 200 or 400. Not #8 or none or #404.)
Do I have to set:
SslHttpCli3.StatusCode := 0;
each time myself before calling .GET ? (Otherwise I do not see, why I do get a "True" as result.)
Thank you very much in forward for any insight / help / idea !🙂