BUG: Timing Crack Between FD_CONNECT and Call to Shut Down API

ID: Q186244


The information in this article applies to:
  • Microsoft Windows NT 4.0


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

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

Additional query words:

Keywords : kbnetwork kbAPI kbNTOS400bug kbSDKPlatform kbWinsock kbGrpNet
Version : winnt:4.0
Platform : winnt
Issue type : kbbug


Last Reviewed: October 15, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.