UnityRenderStreaming icon indicating copy to clipboard operation
UnityRenderStreaming copied to clipboard

[REQUEST] HttpSignaling should be fully asynchronous

Open kevinfoley opened this issue 3 years ago • 2 comments

The HttpWebRequest operations in HttpSignaling are all synchronous, meaning they will lock the current thread until completed. Currently, HttpSignaling is only partially threaded. HTTPPooling() runs in a separate thread, but other functions in the class can be called from the main thread. For example, SendAnswer() is called from the main thread in Broadcast. This can cause Unity to freeze and become unresponsive if the signaling server is slow to respond to the request.

If HttpWebRequest used asynchronous networking functions, such as those provided by Unity's UnityWebRequest class, requests would never lock the main thread.

kevinfoley avatar Dec 11 '21 01:12 kevinfoley

@kevinfoley Right, it should be fixed. Thanks.

karasusan avatar Dec 14 '21 02:12 karasusan

memo: URS-380

karasusan avatar Dec 14 '21 02:12 karasusan