Commit 6c9c8f9
Invalidate underlying connection on sync-timeout
ISSUE-12 — _run_sync now schedules _async_conn._invalidate() on the
loop thread before raising OperationalError on sync-side timeout.
The coroutine may have already written bytes to the socket before
observing the cancel; without invalidation the next operation reuses
a wire in unknown state, causing mysterious protocol errors later.
Fire-and-forget via call_soon_threadsafe so we don't need to wait
for the event loop.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 83fdc76 commit 6c9c8f9
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| |||
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
84 | 101 | | |
85 | 102 | | |
86 | 103 | | |
| |||
0 commit comments