Atozed Forums
Number of remaining sessions if I close one session - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Number of remaining sessions if I close one session (/thread-774.html)



Number of remaining sessions if I close one session - jorgo2018 - 10-26-2018

Hallo,

I have an IntraWeb SA application. If the user closes a session I want to get the count of the remaining sessions.
I call "gSessions.getCount" in TIWServerController.IWServerControllerBaseCloseSession method.
Then my application hangs.

Code:
procedure TIWServerController.IWServerControllerBaseCloseSession(aSession: TIWApplication);
var
 nCount : integer;

begin
 try
   nCount := gSessions.getCount;
 except
 end;
end;


How could I get the number of the remaining sessions at this point?

Best regards


RE: Number of remaining sessions if I close one session - kudzu - 10-26-2018

Sessions are locked and have critical sections at various points. Without digging into code, I would bet its locked during this event and you should try a different event.