You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(foundation): close the engine too when the Extractor constructor raises after choosing one #2107
Found while reviewing #2106. Extractor.__init__ assigns _exeng once the magic number is read. If _exeng.run(), _open_output() or record_frames raises after that, nothing calls _exeng.close(). #2106 closes the input the Extractor owns, but an engine's own resources stay open until garbage collection. For example, PyShark's _extmp capture keeps its temporary file and tshark process.
Proposed: in #2106's handler, also close the engine when one exists, for example with getattr(self, '_exeng', None). Do it without masking the original exception. Add a test that injects a raising engine and checks its close() ran. This depends on #2106 merging first.
Activity
fix(foundation): close the engine too when the Extractor constructor …
fix(foundation): close the engine too when the Extractor constructor …