Teknium
5651a73331
fix(gateway): guard-match the finally-block _active_sessions delete
...
Before this, _process_message_background's finally did an unconditional
'del self._active_sessions[session_key]' — even if a /stop/ /new
command had already swapped in its own command_guard via
_dispatch_active_session_command and cancelled us. The old task's
unwind would clobber the newer guard, opening a race for follow-ups.
Replace with _release_session_guard(session_key, guard=interrupt_event)
so the delete only fires when the guard we captured is still the one
installed. The sibling _session_tasks pop already had equivalent
ownership matching via asyncio.current_task() identity; this closes the
asymmetry.
Adds two direct regressions in test_session_split_brain_11016:
- stale guard reference must not clobber a newer guard by identity
- guard=None default still releases unconditionally (for callers that
don't have a captured guard to match against)
Refs #11016
2026-04-23 05:15:52 -07:00
..
2026-04-16 06:49:36 -07:00
2026-04-20 05:15:54 -07:00
2026-04-17 06:36:34 -07:00
2026-04-21 00:50:58 -07:00
2026-04-20 04:16:13 -07:00
2026-04-20 22:13:07 -07:00
2026-04-14 16:56:49 -07:00
2026-04-16 06:31:23 -07:00
2026-04-15 15:09:23 -07:00
2026-04-17 01:05:09 -07:00
2026-04-14 22:07:28 -07:00
2026-04-19 01:48:42 -07:00
2026-04-17 20:25:48 -07:00
2026-04-18 18:53:22 -07:00
2026-04-21 14:31:48 -05:00
2026-04-16 06:31:23 -07:00
2026-04-16 06:48:33 -07:00
2026-04-17 06:26:18 -07:00
2026-04-22 11:59:39 -07:00
2026-04-17 19:26:53 -07:00
2026-04-17 04:08:42 -07:00
2026-04-17 04:59:03 -07:00
2026-04-17 05:48:26 -07:00
2026-04-19 18:12:55 -07:00
2026-04-17 04:08:42 -07:00
2026-04-17 06:46:52 -07:00
2026-04-19 11:08:10 -07:00
2026-04-17 04:17:56 -07:00
2026-04-17 20:25:48 -07:00
2026-04-22 16:23:21 -07:00
2026-04-14 10:52:23 -07:00
2026-04-20 00:57:53 -07:00
2026-04-16 05:53:18 -07:00
2026-04-17 01:05:09 -07:00
2026-04-19 18:12:55 -07:00
2026-04-14 14:22:11 -07:00
2026-04-17 19:04:11 -07:00
2026-04-17 19:04:11 -07:00
2026-04-22 18:06:22 -07:00
2026-04-16 06:31:23 -07:00
2026-04-17 01:05:09 -07:00
2026-04-22 16:23:21 -07:00
2026-04-15 17:54:16 -07:00
2026-04-21 01:33:10 -07:00
2026-04-17 04:03:02 +05:30
2026-04-16 20:43:41 -07:00
2026-04-17 01:05:09 -07:00
2026-04-17 01:05:09 -07:00
2026-04-15 13:35:40 -07:00
2026-04-18 19:32:26 -07:00
2026-04-19 03:03:57 -07:00
2026-04-21 05:52:46 -07:00
2026-04-17 15:31:14 -07:00
2026-04-21 13:33:02 -07:00
2026-04-20 05:15:54 -07:00
2026-04-17 21:17:33 -07:00
2026-04-18 17:40:34 -07:00
2026-04-19 03:03:57 -07:00
2026-04-21 00:43:50 -07:00
2026-04-20 03:03:07 -07:00
2026-04-18 18:53:31 -07:00
2026-04-22 18:26:59 -07:00
2026-04-16 02:26:14 -07:00
2026-04-16 06:31:23 -07:00
2026-04-21 18:52:26 -05:00
2026-04-19 03:03:57 -07:00
2026-04-23 05:15:52 -07:00
2026-04-17 15:18:23 -07:00
2026-04-20 03:10:19 -07:00
2026-04-22 04:31:59 -07:00
2026-04-21 00:54:46 -07:00
2026-04-21 01:33:10 -07:00
2026-04-22 08:49:24 -07:00
2026-04-17 01:05:09 -07:00
2026-04-19 03:03:57 -07:00
2026-04-22 16:33:46 -07:00
2026-04-18 04:17:18 -07:00
2026-04-19 22:46:47 -07:00
2026-04-14 17:08:35 -07:00
2026-04-15 17:54:43 -07:00
2026-04-20 05:10:23 -07:00
2026-04-17 14:27:26 -07:00
2026-04-21 03:06:56 -07:00
2026-04-20 00:10:22 -07:00
2026-04-16 06:49:36 -07:00
2026-04-15 22:35:19 -07:00
2026-04-21 06:23:09 -07:00
2026-04-19 00:09:38 -07:00
2026-04-19 22:16:37 -07:00
2026-04-22 16:23:21 -07:00
2026-04-21 01:56:35 -07:00
2026-04-19 22:36:00 -07:00
2026-04-19 22:36:00 -07:00
2026-04-19 05:18:19 -07:00
2026-04-19 22:45:08 -07:00
2026-04-17 19:03:29 -07:00
2026-04-17 06:50:36 -07:00
2026-04-20 20:49:32 -07:00
2026-04-20 11:56:19 -07:00