Skip to content

Conversation

@douglas-raillard-arm
Copy link
Collaborator

Fixes #684

This PR is untested for now.

Allow cleanly disconnecting the Target object, so that we don't get
garbage output from __del__ later on when half of the namespace has
already disappeared.
Ensure the connections that Target.disconnect() closes do not stay
around in case the Target object is later reused.
Use atexit handler to run Target.disconnect() when the process is about
to exit. This avoids running it with a half torn down namespace, with
ensuing exceptions and non-clean disconnect.
@douglas-raillard-arm
Copy link
Collaborator Author

PR updated to also disconnect upon process exit, before the modules are torn down. This should prevent getting exceptions logged in __del__ in common cases, for anything that is cleaned-up in Target.disconnect() (which includes all current connection objects)

@douglas-raillard-arm douglas-raillard-arm changed the title [Draft] Fix __del__ excep Fix __del__ excep May 8, 2024
@marcbonnici marcbonnici merged commit 5228105 into ARM-software:master Jun 12, 2024
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.

utils.ssh.SshConnectionBase issues caused by garbage collection

2 participants