diff --git a/apps/s_server.c b/apps/s_server.c index da093523c..548eacbbc 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2662,7 +2662,7 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context) for (;;) { i = BIO_gets(io, buf, bufsize - 1); if (i < 0) { /* error */ - if (!BIO_should_retry(io)) { + if (!BIO_should_retry(io) && !SSL_waiting_for_async(con)) { if (!s_quiet) ERR_print_errors(bio_err); goto err; @@ -2929,7 +2929,7 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context) #endif k = BIO_write(io, &(buf[j]), i - j); if (k <= 0) { - if (!BIO_should_retry(io)) + if (!BIO_should_retry(io) && !SSL_waiting_for_async(con)) goto write_error; else { BIO_printf(bio_s_out, "rwrite W BLOCK\n");