Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with getting session list
#4
Hi Alexandre!
Yes, it is sessions I want to terminate, and yes, terminate session b from session a.
I'll try without the free.
Thx Martin

Hi again,
Yes, that worked, I no longer get errors when reading the list.
But the list just keeps growing, the sessions are never freed as far as I can tell.
I saw from the examples that you can set a parameter on terminate and that is the new HTML it shows. 
Is that a way to go when wanting the forms in a session to be released, I have some forms with big amount of data on them and those dataset are never freed when the form is not freed.
What can I do?
Thx Martin


Edit: I have put a SessionTimeout := 1; and that triggers the release of my forms after a minute at least. Is there a cleaner way?

Code:
    for aid in alst do begin
      if aid <> ASession.AppID then begin
        app:=gSessions.LookupAndLock(aid, exp, al);
        if Assigned(app) and not exp then begin
          if app.Name = ASession.Name then begin
            if _LogEnabled then
              _Log('Session "' + app.AppID + '" will be terminated');
            //app.ReleaseForm(app.Forms[0]);
            app.SessionTimeOut:=1;
            app.Terminate;
          end;
          app.Unlock;
        end;
      end;
    end;
Reply


Messages In This Thread
RE: Problem with getting session list - by martin.andersen@amesto.dk - 09-10-2020, 11:53 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)