Hello Danijel,
I try to change some part of my code to react to SessionOpen and SessionClose on my server side. First of all there are 2, one in the httpServer and another one in RtcServerModule. Which one should I use to see, when I client with a successful connection comes and goes ? I guess it's the ServerModule, right ?
Well, there comes the problem : Sometimes SessionOpen is called, sometimes is not. When I debug, it's always been called. But SessionClose is worse. If I do not debug, it's never called. If I debug, it looks like it's called but half the time it has no event handler assigned in
procedure TRtcBaseServerModule.Call_SessionClose(Sender: TRtcConnection);
begin
if assigned(FOnSessionClose) then
FOnSessionClose(Sender);
end;
I placed a breakpoint there. But often it never gets even in debug the session close event.
I placed codesite messages in all 4 events :
procedure TDMRTC.HttpServerSessionClose(Sender: TRtcConnection);
begin
CodeSite.Send(csmLevel1, 'HttpServer.SessionClose', Sender.Session.ID);
end;
procedure TDMRTC.HttpServerSessionOpen(Sender: TRtcConnection);
begin
CodeSite.Send(csmLevel4, 'HttpServer.SessionOpen', Sender.Session.ID);
end;
procedure TDMRTC.sm_LocalServerSessionClose(Sender: TRtcConnection);
begin
CodeSite.Send(csmLevel1, 'sm_LocalServer.SessionClose', Sender.Session.ID);
end;
procedure TDMRTC.sm_LocalServerSessionOpen(Sender: TRtcConnection);
begin
CodeSite.Send(csmLevel4, 'sm_LocalServer.SessionOpen', Sender.Session.ID);
end;
and here the result from connect to disconnect, where I should get SessionClose, right ?
Do have have wrong expectations ? Or did I do anything wrong ?
Any ideas or hints ?
Helge