How to kill a session?

Hello all,

The following code is leaving a session, ok.

[code] dim wp As WebPage=App.SessionAtIndex(2).PageAtIndex(0)
dim sess as Session=app.SessionForControl(wp)

sess.Quit[/code]

But if I look at the number of sessions (app.sessioncount), it has not diminished, as if the session is still active. Even playing with the timeout, autoquit etc… (app, session …). Even waiting a long time. The number of sessions is the same.

if I add sess = nil, same thing.

By cons, if I close the browser tab, the session closes. But how close by the code?

Thank you
olivier

By virtue of having the page open you have a session. If you close the session I suspect it does one of two things:

  1. Decides thats not possible and ignores it.
  2. Starts an entirely new session that opens the moment your first one closed.
  1. A counting bug?
  2. Some kind of leak?

Anyway, something is weird.

Note: the code is called from another session.

[quote=34558:@Phillip Zedalis]1. Decides thats not possible and ignores it.
2. Starts an entirely new session that opens the moment your first one closed.[/quote]

Thank you, but I just checking displaying the identifier of each session. There are no new session. Those are the same sessions.

Try ShowURL to tell the user’s browser to leave the page. Perhaps have it go to a “special” URL “session over” page.

Thank you Brad, this is the good reason!