You are not logged in.
Pages: 1
Hello everyone
A situation arises when working with TOpenApiClient - TJsonClient - TSimpleHttpClient mainly during debugging inside MVC server
- connection timeout occurs during step-by-step debugging in the IDE, after sending TOpenApiClient a request to the server
- when using the browser and when trying to re-request the MVC server by refreshing the page, the framework works, as it seems to me, in a contradictory way (mormot.net.client)
- The function Request - RawConnect - SockConnected - shows the value "true"
- The function fHttp.Request - sets the ctxt.Retry:= [rMain], then RequestInternal - fSock.Available(@loerr) - shows the value "false" and in DoRetry we get status=HTTP_CLIENTERROR
How can I reset this error condition manually?
Last edited by Alek (2025-03-17 13:29:56)
Offline
Good morning.
The translator doesn't always help me choose the right words.
After additional investigation, the TSimpleHttpClient.Request was discovered.
- I noticed the problem only when working with http
- the issue is with the hard-set {Retry}true parameter of the function
result := fHttp.Request(
Uri.Address, Method, KeepAlive, Header, Data, DataMimeType, {retry=}true);
-this parameter sets the ctxt.Retry := [rMain] property before attempting to reconnect again (if it is closed).
- next, when executing the THttpClientSocket.RequestInternal-DoRetry function (due to socket unavailability)
,the branch is executed:
if rMain in ctxt.Retry then
// we should retry once -> return error only if failed twice
ctxt.Status := FatalErrorCode
although there was no attempt to reopen the connection.
Last edited by Alek (2025-03-19 07:44:14)
Offline
Pages: 1