diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-12-03 01:05:40 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-12-03 01:05:40 +0000 |
commit | bdb38fdeb4183371b8ad8669c2821526133c39c8 (patch) | |
tree | 668f6b7e4ffc1549578259b19c4dd4d916d7156a /src/sbearssl/sbearssl_run.c | |
parent | db3aa47688fa38d4edd6563ce350577617e71a27 (diff) | |
download | s6-networking-bdb38fdeb4183371b8ad8669c2821526133c39c8.tar.xz |
s6-tls*: small bugfixes. Add documentation.
Diffstat (limited to 'src/sbearssl/sbearssl_run.c')
-rw-r--r-- | src/sbearssl/sbearssl_run.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sbearssl/sbearssl_run.c b/src/sbearssl/sbearssl_run.c index e4d49fa..ca4a79e 100644 --- a/src/sbearssl/sbearssl_run.c +++ b/src/sbearssl/sbearssl_run.c @@ -71,7 +71,12 @@ int sbearssl_run (br_ssl_engine_context *ctx, int *fds, unsigned int verbosity, else if (!r) { fd_close(fds[0]) ; fds[0] = -1 ; - br_ssl_engine_close(ctx) ; + if (options & 1) + { + shutdown(fds[3], SHUT_WR) ; + fd_close(fds[3]) ; fds[3] = -1 ; + } + else br_ssl_engine_close(ctx) ; continue ; } |