Do TLS_WANT on tls_close too. - geomyidae - A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae) (HTM) git clone git://r-36.net/geomyidae (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 6aaceedcc36a36f52cfb27bfdbcfde2ba71381da (DIR) parent f827151059463740fbdd59834ce0620b81d80d61 (HTM) Author: Christoph Lohmann <20h@r-36.net> Date: Sat, 12 Aug 2023 19:20:56 +0200 Do TLS_WANT on tls_close too. Diffstat: M main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- (DIR) diff --git a/main.c b/main.c @@ -1162,7 +1162,11 @@ read_selector_again: } while (shuflen > 0); if (tlsclientreader) { - tls_close(tlsclientctx); + wlen = TLS_WANT_POLLIN; + while (wlen == TLS_WANT_POLLIN \ + wlen == TLS_WANT_POLLOUT) { + wlen = tls_close(tlsclientctx); + } tls_free(tlsclientctx); }