From 51a612c34446e10a086947c410aa206fa978d169 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 26 Nov 2020 01:37:01 +0000 Subject: That exit condition is really hard to get right >.> --- src/sbearssl/sbearssl_run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sbearssl') diff --git a/src/sbearssl/sbearssl_run.c b/src/sbearssl/sbearssl_run.c index ad2b0ad..af58a04 100644 --- a/src/sbearssl/sbearssl_run.c +++ b/src/sbearssl/sbearssl_run.c @@ -76,7 +76,7 @@ void sbearssl_run (br_ssl_engine_context *ctx, int *fds, tain_t const *tto, uint } else xindex[3] = 4 ; - if (xindex[0] == 4 && xindex[1] == 4 && xindex[3] == 4 && handshake_done) break ; + if (xindex[0] == 4 && xindex[1] == 4 && xindex[3] == 4 && handshake_done || !j) break ; tain_add_g(&deadline, fds[0] >= 0 && fds[2] >= 0 && state & (BR_SSL_SENDAPP | BR_SSL_RECVREC) ? tto : &tain_infinite_relative) ; r = iopause_g(x, j, &deadline) ; -- cgit v1.2.3