Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_socket.cc')
-rw-r--r--winsup/cygwin/fhandler_socket.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index 952b87b82..878880da0 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -953,7 +953,8 @@ fhandler_socket::sendto (const void *ptr, size_t len, int flags,
break;
}
}
- while (!(res = wsock_evt.wait (get_socket (), has_been_closed)));
+ while (!(res = wsock_evt.wait (get_socket (), has_been_closed))
+ && !has_been_closed);
wsock_evt.release (get_socket ());
}
}
@@ -1088,7 +1089,8 @@ fhandler_socket::sendmsg (const struct msghdr *msg, int flags, ssize_t tot)
break;
}
}
- while (!(res = wsock_evt.wait (get_socket (), has_been_closed)));
+ while (!(res = wsock_evt.wait (get_socket (), has_been_closed))
+ && !has_been_closed);
wsock_evt.release (get_socket ());
}
}