Commit 3474cce
Classify InterfaceError("Connection is closed") as a disconnect
After the underlying DBAPI connection is closed out of band (pool
invalidate, cluster membership change, explicit close), the next
statement raises dqlitedbapi.InterfaceError("Connection is closed").
is_disconnect was only testing OperationalError subtypes, so the pool
did NOT invalidate the stale slot and the error kept surfacing on
every check-out. Add a narrow InterfaceError branch keyed on the
"connection is closed" / "cursor is closed" messages — programming-
error InterfaceErrors (e.g. arraysize validation) stay unclassified.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ef47f8b commit 3474cce
2 files changed
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
299 | 309 | | |
300 | 310 | | |
301 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
322 | 351 | | |
323 | 352 | | |
324 | 353 | | |
| |||
0 commit comments