Before this change, if a session handle became invalid it would still be returned to the caller.
This commit uses C_GetSessionInfo to check that a handle is still valid before returning it from the pool. If a session is no longer valid, it is discarded.
Before this change, if a session handle became invalid it would still be returned to the caller.
This commit uses C_GetSessionInfo to check that a handle is still valid before returning it from the pool. If a session is no longer valid, it is discarded.