#1 2022-08-16 18:48:35

MARCOSMENDES
Member
Registered: 2022-08-10
Posts: 5

Whay not wont executed event OnSessionClose?

Hello everyone,

I implemented event OnSessionClose in my server application. When the client execute the CloseSession method, the event is executed, but when the application client is abruptly finished (i accessed taskmgr and finished the app) this event does not executed!

Someone know reason? Or this behavior is right!

Offline

#2 2022-08-16 19:17:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,272
Website

Re: Whay not wont executed event OnSessionClose?

If the client application is killed, the client can't notify the server that it is closed, and since the server has no way to ping back and check the connection over HTTP (as it can do with WebSockets), then the server can't know the session is to be closed.
So this is the expected behavior.

This is the reason why there is a timeout for all sessions, to release inactive sessions after a given time.

Offline

#3 2022-08-16 19:41:31

MARCOSMENDES
Member
Registered: 2022-08-10
Posts: 5

Re: Whay not wont executed event OnSessionClose?

Thanks for response ab!
About timeout for all sessions, how can i do for configuration this? I make a test, leaving my app server for more one hour expecting that OnSessionClose were executed, but not!
What lack i to make?

Offline

#4 2022-08-16 20:51:25

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,272
Website

Re: Whay not wont executed event OnSessionClose?

It is defined in TAuthGroup.SessionTimeOut.

But you need to kill the client, otherwise the client will renew automatically the session before it expires, even if no client request is called.

Offline

Board footer

Powered by FluxBB