FIX: Timing Crack Between FD_CONNECT and Call to Shut Down API (186244)
The information in this article applies to:
- Microsoft Windows NT Server 4.0
- Microsoft Windows NT Workstation 4.0
This article was previously published under Q186244 SYMPTOMS
When using WSAEventSelect, a call to the shutdown API shortly after
receiving a FD_CONNECT notification might fail with WSAENOTCONN.
CAUSE
There is a timing crack between receipt of a FD_CONNECT notification and a
subsequent call to the shutdown API where the system reports that the
socket is not connected.
RESOLUTION
Use one of the following to work around this problem:
- Use a blocking call to the connect or WSAConnect API.
- If you receive WSAENOTCONN when calling the shutdown API, place the call
to the shutdown API in a loop with a small delay (few milliseconds).
STATUS
This problem was corrected in Windows 2000.
Modification Type: | Major | Last Reviewed: | 10/29/2003 |
---|
Keywords: | kbAPI kbBug kbfix kbnetwork kbOSWin2000fix kbWinsock KB186244 |
---|
|