diff options
Diffstat (limited to 'crypto/bio/bss_conn.c')
-rw-r--r-- | crypto/bio/bss_conn.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index 3abf2354a5..6c554ff6e6 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -313,6 +313,8 @@ static int conn_read(BIO *b, char *out, int outl) if (ret <= 0) { if (BIO_sock_should_retry(ret)) BIO_set_retry_read(b); + else if (ret == 0) + b->flags |= BIO_FLAGS_IN_EOF; } } return ret; @@ -492,6 +494,9 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) *fptr = data->info_callback; } break; + case BIO_CTRL_EOF: + ret = (b->flags & BIO_FLAGS_IN_EOF) != 0 ? 1 : 0; + break; default: ret = 0; break; |