Background: I use CreateIoCompletionPort, WSASend / Recv and GetQueuedCompletionStatus to override the io socket on my server. For flow control, when you send to a client, I only allow a few WSASend () when all pending OVERLAPs have exited IOCP.
Problem. Recently, there have been cases when OVERLAP does not return to IOCP. The thread calling GetQueuedCompletionStatus does not receive them, and they remain in my local pending queue. I checked that the client is receiving data from the socket and the socket is connected. When WSASend () was called, no errors were returned. OVERLAP simply never returns without an external stimulus, for example:
- Disconnecting a socket from a client or server immediately allows the GetQueuedCompletionStatus stream to retrieve OVERLAPs
- When making additional WSASend () calls, it sometimes takes several before all OVERLAPs suddenly exit the queue.
Question: Has anyone seen this type of behavior? Any ideas on what causes this?
Thanks Jeffrey
Geoffrey
source share