* fhandler_socket.cc (fhandler_socket::ioctl): Only cancel

WSAAsyncSelect when async mode is on.
This commit is contained in:
Corinna Vinschen 2005-03-04 08:36:43 +00:00
parent 6b76b0c5d4
commit f317a917bc
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-03-04 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_socket.cc (fhandler_socket::ioctl): Only cancel
WSAAsyncSelect when async mode is on.
2005-03-03 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din (utmpxname): Export.

View File

@ -1594,7 +1594,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
/* We must cancel WSAAsyncSelect (if any) before setting socket to
* blocking mode
*/
if (cmd == FIONBIO && *(int *) p == 0)
if (cmd == FIONBIO && async_io () && *(int *) p == 0)
WSAAsyncSelect (get_socket (), winmsg, 0, 0);
res = ioctlsocket (get_socket (), cmd, (unsigned long *) p);
if (res == SOCKET_ERROR)