diff options
author | Sunil Nimmagadda <sunil@cvs.openbsd.org> | 2017-03-07 08:00:24 +0000 |
---|---|---|
committer | Sunil Nimmagadda <sunil@cvs.openbsd.org> | 2017-03-07 08:00:24 +0000 |
commit | 295b208bdcd2565755c394c3c1ddd159aeaa7d8c (patch) | |
tree | eea9db236776e62e6f5ee0f7b50590c1444d83d0 /usr.bin | |
parent | 74f243f3c750395175efb5ed224a7e26980e975a (diff) |
tls_close() can return TLS_WANT_POLLIN/TLS_WANT_POLLOUT, handle them
appropriately.
Ok jca@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ftp/fetch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index 625dcf3e2e7..e50390bb8ae 100644 --- a/usr.bin/ftp/fetch.c +++ b/usr.bin/ftp/fetch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fetch.c,v 1.162 2017/03/02 09:29:53 sthen Exp $ */ +/* $OpenBSD: fetch.c,v 1.163 2017/03/07 08:00:23 sunil Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- @@ -1031,7 +1031,9 @@ improper: cleanup_url_get: #ifndef NOSSL if (tls != NULL) { - tls_close(tls); + do { + i = tls_close(tls); + } while (i == TLS_WANT_POLLIN || i == TLS_WANT_POLLOUT); tls_free(tls); } free(full_host); |