From 9f70f3708bc6933de002b20f8cd6cb6d7a3c3e8c Mon Sep 17 00:00:00 2001 From: LordTocs Date: Wed, 14 Feb 2024 14:31:06 -0500 Subject: [PATCH] Force a disconnect on error incase we get a NotReady --- packages/castmate/src/main/plugins/obs.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/castmate/src/main/plugins/obs.js b/packages/castmate/src/main/plugins/obs.js index c54b3525..a6f17248 100644 --- a/packages/castmate/src/main/plugins/obs.js +++ b/packages/castmate/src/main/plugins/obs.js @@ -163,7 +163,6 @@ export default { this.state.connected = true this.analytics.set({ usesOBS: true }) - return true } catch (error) { /*this.logger.error( @@ -173,6 +172,10 @@ export default { `Failed to connect ${error.code}: ${error.message}` )*/ this.state.connected = false + try { + //Disconnect here if we need to since if we get a not ready error OBS won't disconnect to start the loop over. + await this.obs.disconnect() + } catch (err) {} return false } },