[Bug 42377] WSASend() returns invalid number of bytes when both lpOverlapped and lpNumberOfBytesSent

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Feb 5 07:47:00 CST 2017


https://bugs.winehq.org/show_bug.cgi?id=42377

--- Comment #11 from Bruno Jesus <00cpxxx at 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.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list