@ccaffy 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);

I was thinking about calling SSL_get_error, as recommended in the docs.

It looks like I need an error code as second argument, which I do not have right now. There's only one place where SSL_get_error() is called: https://github.com/xrootd/xrootd/blob/master/src/XrdHttp/XrdHttpProtocol.cc#L531

What does "reuse connection" really mean? The socket stays open and connected and we start a new session on the existing socket? When Recycle() gets called the socket will definitely be closed unless it was marked as a shared socket which doesn't appear to ever happen.

Alright so thanks to that architecture, there is no need to call this SSL_Shutdown() twice as the connection will never be re-used. Thanks!


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <xrootd/xrootd/pull/1968/review/1349035136@github.com>

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/pull/1968#discussion_r1142436963", "url": "https://github.com/xrootd/xrootd/pull/1968#discussion_r1142436963", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

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