FS-6854 #comment try this patch

This commit is contained in:
Anthony Minessale 2014-09-30 20:35:14 +05:00
parent 6ac26fcc3e
commit 0150c862a2
3 changed files with 21 additions and 5 deletions

View File

@ -1 +1 @@
Thu Sep 25 21:43:53 CDT 2014
Tue Sep 30 20:32:49 CDT 2014

View File

@ -352,7 +352,10 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block)
goto end;
}
if (block) ms_sleep(10);
if (block) {
wsh->x++;
ms_sleep(10);
}
}
} while (r == -1 && err == SSL_ERROR_WANT_READ && wsh->x < 100);
@ -361,14 +364,19 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block)
}
do {
r = recv(wsh->sock, data, bytes, 0);
if (r == -1) {
if (!block && xp_is_blocking(xp_errno())) {
r = -2;
goto end;
}
if (block) ms_sleep(10);
if (block) {
wsh->x++;
ms_sleep(10);
}
}
} while (r == -1 && xp_is_blocking(xp_errno()) && wsh->x < 100);

View File

@ -352,7 +352,10 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block)
goto end;
}
if (block) ms_sleep(10);
if (block) {
wsh->x++;
ms_sleep(10);
}
}
} while (r == -1 && err == SSL_ERROR_WANT_READ && wsh->x < 100);
@ -361,14 +364,19 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block)
}
do {
r = recv(wsh->sock, data, bytes, 0);
if (r == -1) {
if (!block && xp_is_blocking(xp_errno())) {
r = -2;
goto end;
}
if (block) ms_sleep(10);
if (block) {
wsh->x++;
ms_sleep(10);
}
}
} while (r == -1 && xp_is_blocking(xp_errno()) && wsh->x < 100);