Commit dfe24dd
Absorb RuntimeError from shielded close so user's exception propagates
acquire()'s broken-conn cleanup wraps the underlying close in
asyncio.shield. The inner except only catches OSError /
DqliteConnectionError. A RuntimeError from inside the close — most
commonly "Event loop is closed" during a racing engine.dispose() —
would propagate out and SUPPLANT the user's original exception
(preserved only on __context__).
Add a narrow except RuntimeError that logs-and-absorbs. The bare
``raise`` further out then re-raises the user's original exception
unchanged. Narrow to RuntimeError specifically so programming bugs
(AttributeError, TypeError, etc.) still surface per done/ISSUE-198.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 251a078 commit dfe24dd
2 files changed
Lines changed: 27 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
789 | 806 | | |
790 | 807 | | |
791 | 808 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
116 | | - | |
117 | | - | |
118 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
124 | 129 | | |
125 | | - | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| |||
0 commit comments