Skip to content

Release the Archon connections when a camera session is destroyed - #52

Merged
mikelangmayr merged 1 commit into
mainfrom
release-archon-sockets-on-destruction
Oct 13, 2026
Merged

mikelangmayr merged 1 commit into
mainfrom
release-archon-sockets-on-destruction

Conversation

@mikelangmayr

@mikelangmayr mikelangmayr commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
  • CameraSession gains a destructor that calls disconnect_controller, closing both the primary and the control socket
  • Previously nothing invoked it: there was no destructor and callers were not required to call close(), so both sockets survived until process exit and were released only once the controller noticed
  • This is a resource leak fix. It does not address the controller becoming unresponsive, which was investigated separately and has a different cause: those failures occur at session teardown and still occur with both sockets closed deliberately
  • The destructor swallows exceptions deliberately, since a destructor must not throw and a failed close is not worth aborting the process for
  • Verified against the HISPEC tracking camera: a script that opens and exits without calling close() now logs "Archon connection terminated", and a 1000 frame autofetch run is unchanged at 854 fps with no dropped frames

@mikelangmayr
mikelangmayr merged commit a357d43 into main Oct 13, 2026
5 checks passed
@mikelangmayr
mikelangmayr deleted the release-archon-sockets-on-destruction branch October 13, 2026 20:57
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.

2 participants