spray-session
spray-session copied to clipboard
Problem for Invalidation/Expiration Callback.
Hi.
At first, My English is poor. I'm sorry about that.
While I tried this spray-session
, I thought that I found something strange behavior.
In this implementation, we can register arbitrary callbacks for session invalidation/expiration.
So I tried this. In InMemorySessionManager
's session expiration, It looks like that this callback was not called.
My idea about why is
- Start at
CleanUp
in Here - Delete the expired session from session map in Here
- The code try to find the already deleted session in session map in Here
My suggestion is
case class Invalidate(String, Option[Map[String, Session[T]]])
instead of
case class Invalidate(String)
Thanks.
P.S. I didn't write any test about this suggestion. Sorry about that.