NativeWebSocket icon indicating copy to clipboard operation
NativeWebSocket copied to clipboard

Perform array copies outside of `lock`s in Receive

Open zach-r-d opened this issue 3 years ago • 0 comments

Call ms.ToArray() outside of the lock (IncomingMessageLock) sections in Receive(). This prevents the Unity main thread blocking on IncomingMessageLock if ms.ToArray() is copying a large number of bytes.

zach-r-d avatar Sep 20 '22 21:09 zach-r-d