mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 11:53:38 +00:00
winetest: Take care of EINTR on send/recv.
This commit is contained in:
parent
ad4ccd1821
commit
49ef87c314
|
@ -92,7 +92,10 @@ send_buf (SOCKET s, const char *buf, size_t length)
|
||||||
|
|
||||||
while (length > 0) {
|
while (length > 0) {
|
||||||
sent = send (s, buf, length, 0);
|
sent = send (s, buf, length, 0);
|
||||||
if (sent == SOCKET_ERROR) return 1;
|
if (sent == SOCKET_ERROR) {
|
||||||
|
if (errno == EINTR) continue;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
buf += sent;
|
buf += sent;
|
||||||
length -= sent;
|
length -= sent;
|
||||||
}
|
}
|
||||||
|
@ -200,6 +203,7 @@ send_file_direct (const char *name)
|
||||||
total = 0;
|
total = 0;
|
||||||
while ((bytes_read = recv (s, buffer+total, BUFLEN-total, 0))) {
|
while ((bytes_read = recv (s, buffer+total, BUFLEN-total, 0))) {
|
||||||
if ((signed)bytes_read == SOCKET_ERROR) {
|
if ((signed)bytes_read == SOCKET_ERROR) {
|
||||||
|
if (errno == EINTR) continue;
|
||||||
report (R_WARNING, "Error receiving reply: %d, %d",
|
report (R_WARNING, "Error receiving reply: %d, %d",
|
||||||
errno, WSAGetLastError ());
|
errno, WSAGetLastError ());
|
||||||
goto abort1;
|
goto abort1;
|
||||||
|
|
Loading…
Reference in a new issue