mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-04 00:17:01 +00:00
5135a6cd3d
Now that the expiry comparison actually caches a client, the session it holds is shared, so tearing it down and replacing it needs the same care the IMM handler already takes: Dispose of an expired session with a logout instead of dropping the reference, otherwise every refresh leaves an authenticated session behind on an SMM that only has a handful of slots. That logout has to tolerate a session the SMM has already reaped, hence the except. Guard the login itself, so two coroutines arriving at an empty or expired cache do not both log in and orphan one of the two sessions. Stamp the vintage once the login round trips are done rather than before, so a slow SMM cannot hand back a client that is already expired.