summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-11-26 01:37:01 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-11-26 01:37:01 +0000
commit51a612c34446e10a086947c410aa206fa978d169 (patch)
treedf9492a598721c623015175ce3f2472bfe3a99ad
parent005fae888243b1a9c51c270a689f08699164ac1d (diff)
downloads6-networking-51a612c34446e10a086947c410aa206fa978d169.tar.xz
That exit condition is really hard to get right >.>
-rw-r--r--src/sbearssl/sbearssl_run.c2
1 files changed, 1 insertions, 1 deletions
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) ;