Skip to content

Commit 74e319a

Browse files
committed
remove source message listener when test ends
* stops worker thread properly
1 parent 01cc686 commit 74e319a

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

tests/osn-tests/src/test_osn_simple_recording.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ describe(testName, () => {
664664
sceneItem1.remove();
665665

666666
scene.release();
667+
obs.removeSourceMessageListener();
667668
});
668669

669670

tests/osn-tests/util/obs_handler.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,11 @@ export class OBSHandler {
543543
});
544544
}
545545

546+
removeSourceMessageListener() {
547+
osn.NodeObs.RegisterSourceCallback(null);
548+
osn.NodeObs.RegisterSourceMessageCallback(null);
549+
}
550+
546551
isDarwin()
547552
{
548553
// Wrapped this in a function- just incase we want to add more conditions later or disable only within the build agent.

0 commit comments

Comments
 (0)