Commit cd421be
committed
fix: handle cancellation race in RequestResponder.respond()
When a CancelledNotification arrives after the handler completes but before
respond() is called, cancel() sets _completed=True and sends an error response.
The subsequent respond() call would hit an AssertionError.
This change replaces the assert with a guard: if _completed is already True,
respond() returns silently since the cancellation response was already sent.
Fixes: #2416
_Submitted via TTClaw bounty hunter._1 parent f27d2aa commit cd421be
File tree
1 file changed
+3
-1
lines changed1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
0 commit comments