You are not logged in.
Pages: 1
the following call works fine on windows xp and win7, but it crashed on windows 2008 server:
TSQLHttpClient(Client).CallBackPut('rpcname',RUTF8,rtnutf8);
the actually position is in TSQLRestClientURI.URI of mORMot.pas as follow:
......
DoRetry:
if fSessionAuthentication=nil then
Call.Url := url else
Call.Url := fSessionAuthentication.ClientSessionSign(self,url);
Call.Method := method;
if SendData<>nil then
Call.InBody := SendData^;
{$ifndef LVCL}
if Assigned(fOnIdle) then begin
if fBackgroundThread=nil then
fBackgroundThread := TSynBackgroundThreadEvent.Create(OnIdle,OnBackgroundProcess);
if not fBackgroundThread.AsynchRun(@Call) then
Call.OutStatus := HTML_UNAVAILABLE;
end else
{$endif}
begin
InternalURI(Call); <<------------- crashed here
if Call.OutStatus=HTML_NOTIMPLEMENTED then begin // InternalCheckOpen failed
InternalClose; // force recreate connection
InternalURI(Call); // try request again
end;
end;
result.Lo := Call.OutStatus;
result.Hi := Call.OutInternalState;
if Head<>nil then
Head^ := Call.OutHead;
if Resp<>nil then
Resp^ := Call.OutBody;
fLastErrorCode := Call.OutStatus;
if (Call.OutStatus=HTML_TIMEOUT) and aRetryOnceOnTimeout then begin
aRetryOnceOnTimeout := false;
{$ifdef WITHLOG}
SQLite3Log.Add.Log(sllError,'% % returned "408 Request Timeout" -> RETRY',
[method,url],self);
{$endif}
goto DoRetry;
end;
......
Offline
i just call it on windows 2003 server , it is ok.
Offline
yes, i am using the latest version, and the Client instance class is TSQLRestClientURI defined as follow:
Client:TSQLRestClientURI;
Offline
So you should be able to write
Client.CallBackPut('rpcname',RUTF8,rtnutf8);
I just run the regression tests on Windows Server 2008 R2, with no specific problem.,
They contain some CallBackPut() calls, AFAIK.
But I discovered some unexpected issues with the SynCrtSock.THttpServer socket-based server.
I fixed those, but I'm not expected that any problem occurs on client side.
See http://synopse.info/fossil/info/f643413f58
And this problem is also occurring on Windows Seven.
So it does not seem it is related to your issue.
What do you call a "crash"?
Which exception?
Stack trace?
Parameters values?
Please enable the logs, and send here some traces.
Which kind of server are your running?
http.sys? socket?
Run the server with administrator rights, to ensure it will use http.sys.
Or even better, register the URI explicitely - see the documentation about this.
Offline
thanks, after i recompile all units, it works now.
by the way, mORMots are really great, and do run fast...
thanks again.
Offline
Pages: 1