From: Roelof duToit Date: Thu, 13 Jul 2017 18:09:19 +0000 (-0400) Subject: Update PR#3925 X-Git-Tag: OpenSSL_1_1_0g~139 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=190909aaabf1d8abf48b0c92a9d425c8f0bd2481;p=oweals%2Fopenssl.git Update PR#3925 Reviewed-by: Tim Hudson Reviewed-by: Bernd Edlinger Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/3925) --- diff --git a/apps/s_time.c b/apps/s_time.c index 233b689144..3459573f1d 100644 --- a/apps/s_time.c +++ b/apps/s_time.c @@ -229,7 +229,9 @@ int s_time_main(int argc, char **argv) fmt_http_get_cmd, www_path); if (SSL_write(scon, buf, buf_len) <= 0) goto end; - while ((i = SSL_read(scon, buf, sizeof(buf))) > 0 || SSL_get_error(scon, i) == SSL_ERROR_WANT_READ) + while ((i = SSL_read(scon, buf, sizeof(buf))) > 0 || + SSL_get_error(scon, i) == SSL_ERROR_WANT_READ || + SSL_get_error(scon, i) == SSL_ERROR_WANT_WRITE) if (i > 0) bytes_read += i; } #ifdef NO_SHUTDOWN @@ -287,7 +289,9 @@ int s_time_main(int argc, char **argv) fmt_http_get_cmd, www_path); if (SSL_write(scon, buf, buf_len) <= 0) goto end; - while ((i = SSL_read(scon, buf, sizeof(buf))) > 0 || SSL_get_error(scon, i) == SSL_ERROR_WANT_READ) + while ((i = SSL_read(scon, buf, sizeof(buf))) > 0 || + SSL_get_error(scon, i) == SSL_ERROR_WANT_READ || + SSL_get_error(scon, i) == SSL_ERROR_WANT_WRITE) continue; } #ifdef NO_SHUTDOWN @@ -318,7 +322,9 @@ int s_time_main(int argc, char **argv) www_path); if (SSL_write(scon, buf, strlen(buf)) <= 0) goto end; - while ((i = SSL_read(scon, buf, sizeof(buf))) > 0 || SSL_get_error(scon, i) == SSL_ERROR_WANT_READ) + while ((i = SSL_read(scon, buf, sizeof(buf))) > 0 || + SSL_get_error(scon, i) == SSL_ERROR_WANT_READ || + SSL_get_error(scon, i) == SSL_ERROR_WANT_WRITE) if (i > 0) bytes_read += i; } #ifdef NO_SHUTDOWN