@amadio commented on this pull request. > @@ -1759,10 +1759,17 @@ void XrdHttpProtocol::Cleanup() { if (ssl) { - - if (SSL_shutdown(ssl) != 1) { - TRACE(ALL, " SSL_shutdown failed"); - ERR_print_errors(sslbio_err); + int ret = SSL_shutdown(ssl); Don't you maybe need also a call to [`SSL_set_shutdown`](https://www.openssl.org/docs/man1.1.1/man3/SSL_set_shutdown.html) before like seen [here](https://github.com/xrootd/xrootd/blob/master/src/XrdTls/XrdTlsSocket.cc#L750)? > @@ -1759,10 +1759,17 @@ void XrdHttpProtocol::Cleanup() { if (ssl) { - - if (SSL_shutdown(ssl) != 1) { - TRACE(ALL, " SSL_shutdown failed"); - ERR_print_errors(sslbio_err); + int ret = SSL_shutdown(ssl); + if (ret != 1) { + if(ret == 0) { + //https://www.openssl.org/docs/man1.0.2/man3/SSL_shutdown.html + //Call again SSL_shutdown + ret = SSL_shutdown(ssl); Is a single retry always sufficient? It seems that in [XrdTlsSocket it may be called up to 4 times](https://github.com/xrootd/xrootd/blob/master/src/XrdTls/XrdTlsSocket.cc#L752-L769) in order to shutdown SSL. -- Reply to this email directly or view it on GitHub: https://github.com/xrootd/xrootd/pull/1968#pullrequestreview-1348899452 You are receiving this because you are subscribed to this thread. Message ID: <[log in to unmask]> ######################################################################## Use REPLY-ALL to reply to list To unsubscribe from the XROOTD-DEV list, click the following link: https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1