@theanalyst commented on this pull request.
In src/XrdHttp/XrdHttpProtocol.cc:
> @@ -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);
Instead of calling ERR_print_errors(bio*)
can't we just clear the thread local queue, and if we really need just peek on the last error code. Depending on how openssl implements its thread local vs global queues it might give us a slight edge over trying to use ERR_print_errors ?
https://www.openssl.org/docs/man1.0.2/man3/ERR_remove_thread_state.html &
https://www.openssl.org/docs/man1.0.2/man3/ERR_peek_last_error.html
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
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