chore(mcp): trim verbose comment on lock cleanup

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-05-11 23:40:23 +00:00
parent 8125c5066b
commit 70b1cc0821
No known key found for this signature in database

View file

@ -3194,13 +3194,8 @@ if MCP_AVAILABLE:
time.monotonic()
)
# Defensive cleanup: if the session has no auth-context
# tracking and no in-flight requests, the per-session lock
# would otherwise be orphaned (the periodic cleanup loop
# iterates ``_stateful_session_auth_context_last_seen`` and
# would never see it). This guards against narrow paths
# where a lock is created for a session_id that never
# entered ``_stateful_session_auth_contexts``.
# Periodic cleanup iterates _stateful_session_auth_context_last_seen,
# so locks for untracked sessions must be dropped here.
if (
active_request_count <= 0
and session_id not in _stateful_session_auth_contexts