https://bugs.winehq.org/show_bug.cgi?id=42377
--- Comment #11 from Bruno Jesus 00cpxxx@gmail.com --- Go or the app is using one thread A to send the data (WSASend) and another thread B to check if operation was completed (GetQueuedCompletionStatus). Something is getting out of sync in the process.
What happens is as follows:
A WSASend(10 bytes) start A WSASend end B GetQueuedCompletionStatus = 10 bytes OK
A WSASend(11 bytes) start A WSASend end B GetQueuedCompletionStatus = 11 bytes OK
A WSASend(12 bytes) start A WSASend end B GetQueuedCompletionStatus = WAIT_TIMEOUT (error 258)
A WSASend(13 bytes) start B GetQueuedCompletionStatus = 12 bytes ?? A WSASend end
Go or the app is not calling GetQueuedCompletionStatus again for the timed out operation. So in the next WSASend it receives prematurely the results of the previous call.