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
I've developed a HTML interface for controlling OBS and all is working brilliantly. I have a small issue though. For various technical reasons, the HTML interface is launched first and then OBS starts later on. I'd like to check every 500ms whether OBS is open and then start controlling it using the WebSocket. I've been using a loop with something like this to check if the WebSocket is available. If yes, the connection is made and the loop is terminated. If there is no WebSocket, an error is fired and the checking loop continues after a fixed delay of 500ms.
If OBS is open, then the connection is made immediately. If OBS is opened after a couple of seconds, the connection is normally made. However, if things are left for longer, it all goes astray.
If seems, when the error is fired the connection attempt doesn’t kill. So, when the attempt is repeated, these non-killed attempts build up and cause a blockage. The delay between attempts becomes exponentially larger.
Does anyone have a solution to kill the connecting process or a solution to continually check whether a WebSocket is available?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've developed a HTML interface for controlling OBS and all is working brilliantly. I have a small issue though. For various technical reasons, the HTML interface is launched first and then OBS starts later on. I'd like to check every 500ms whether OBS is open and then start controlling it using the WebSocket. I've been using a loop with something like this to check if the WebSocket is available. If yes, the connection is made and the loop is terminated. If there is no WebSocket, an error is fired and the checking loop continues after a fixed delay of 500ms.
If OBS is open, then the connection is made immediately. If OBS is opened after a couple of seconds, the connection is normally made. However, if things are left for longer, it all goes astray.
If seems, when the error is fired the connection attempt doesn’t kill. So, when the attempt is repeated, these non-killed attempts build up and cause a blockage. The delay between attempts becomes exponentially larger.
Does anyone have a solution to kill the connecting process or a solution to continually check whether a WebSocket is available?
Beta Was this translation helpful? Give feedback.
All reactions