aristeo Posted May 12, 2020 Share Posted May 12, 2020 I have a problem with my HyperServer, It's not closing all sessions, when these are finished. So I'm trying to figure it out differently ... With a UniThreadTimer in the Servermodule with an interval of 1 minute. I have a code like the following: procedure TUniServerModule.UniThreadTimer1Timer(Sender: TObject); var i:Integer; Sesion:TUniGUISession; begin UniServerModule.SessionManager.Sessions.Lock; try for i:=UniServerModule.SessionManager.Sessions.SessionList.Count-1 downto 0 do begin Sesion:=UniServerModule.SessionManager.Sessions.SessionList[i]; if (MinutesBetween(Now,Sesion.LastTimeStamp)>(SessionTimeout div 1000 div 60)+5) then begin sesion.ReleaseSession; Sesion.Terminate('Ha superado el tiempo de inactividad. Se cerró la sesión'); end; end; finally UniServerModule.SessionManager.Sessions.UnLock; end; end; it goes through all the sessions and the one that since its LastTimeStamp has passed (SessionTimeOut div 1000 div 60) +5 (5 tolerance) minutes. I'm trying to log out. With this solution, there are still open sessions. Could anybody suggest a solution. ? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 12, 2020 Share Posted May 12, 2020 I also have this same problem Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.