Skip to content

Withdraw queued AutoCAD calls when their caller times out - #5

Merged
Erfouni merged 1 commit into
mainfrom
fix/cancel-timed-out-com-calls
Sep 30, 2026
Merged

Erfouni merged 1 commit into
mainfrom
fix/cancel-timed-out-com-calls

Conversation

@Erfouni

@Erfouni Erfouni commented Sep 30, 2026

Copy link
Copy Markdown
Owner

When AutoCAD is stuck at a dialog, the running call times out, but any call queued behind it stayed in the COM queue and ran after the dialog closed, even though its caller had already got an error. So a retried draw_batch could end up drawn twice. run() now cancels a call that never started, and the timeout message says whether the request was withdrawn or may still complete. The new tests/test_bridge_timeout.py fails on main (the abandoned call runs) and passes here; the full suite is 46 tests OK on Python 3.13. Not tried against a live AutoCAD with a real modal dialog.

When AutoCAD sits at a dialog, the call in progress hangs and run() gives
up, but anything the model sends next (usually the same drawing again)
stays in the COM queue and runs once the dialog is closed, even though its
caller was already told it failed. run() now cancels a call that has not
started, and the timeout message says whether the request was withdrawn
or may still finish, so the model knows to check before resending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Erfouni
Erfouni merged commit 21bcf2e into main Sep 30, 2026
2 checks passed
@Erfouni
Erfouni deleted the fix/cancel-timed-out-com-calls branch September 30, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant