Skip to content

Commit

Permalink
Update PR#3925
Browse files Browse the repository at this point in the history
Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Bernd Edlinger <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#3925)
  • Loading branch information
Roelof duToit authored and mattcaswell committed Jul 14, 2017
1 parent f32bf05 commit a87a39d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions apps/s_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ int s_time_main(int argc, char **argv)
www_path);
if (buf_len <= 0 || 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
Expand Down Expand Up @@ -297,7 +299,9 @@ int s_time_main(int argc, char **argv)
buf_len = BIO_snprintf(buf, sizeof(buf), fmt_http_get_cmd, www_path);
if (buf_len <= 0 || 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
Expand Down Expand Up @@ -328,7 +332,9 @@ int s_time_main(int argc, char **argv)
www_path);
if (buf_len <= 0 || 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
Expand Down

0 comments on commit a87a39d

Please sign in to comment.