http://bugs.winehq.org/show_bug.cgi?id=58556
Bug ID: 58556 Summary: winhttp web socket api is not thread safe Product: Wine Version: 10.12 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winhttp Assignee: wine-bugs@winehq.org Reporter: linuxFTW49@gmail.com Distribution: ---
WinHttpWebSocketSend and WinHttpWebSocketReceive cannot be called from two different threads. `socket_receive` can end up calling `send_frame` which is not thread safe when calling `socket_send` from another thread.
From the description on msdn (https://learn.microsoft.com/en-us/windows/win32/winhttp/concurrency-in-winht...)
The send and receive sides of a web socket are separate and may be used concurrently; an application may do a send-only operation on one thread at the same time that another thread is performing a receive-only operation.
This is a mismatch in behavior from the windows implementation of winhttp.dll