Commit 20a564e
committed
DirectDispatcher: resync coverage tracer after each request
A handler-side exception (even one caught and converted to a result, as
MCPServer's tool wrapper does) desyncs CPython 3.11's CTracer when the
DirectDispatcher request path resumes the awaiting coroutine chain via
throw — the same python/cpython#106749 the other transport seams already
work around. The resync_tracer() checkpoint at the end of
_dispatch_request restores tracing for the caller's subsequent lines.1 parent 2d12b96 commit 20a564e
1 file changed
Lines changed: 3 additions & 0 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
| 255 | + | |
| 256 | + | |
254 | 257 | | |
255 | 258 | | |
256 | 259 | | |
| |||
0 commit comments