gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 62/411: conn: check for connection being dead before reuse


From: gnunet
Subject: [gnurl] 62/411: conn: check for connection being dead before reuse
Date: Wed, 13 Jan 2021 01:17:57 +0100

This is an automated email from the git hooks/post-receive script.

nikita pushed a commit to branch master
in repository gnurl.

commit 728f8d3bdc336e3fa838f45cad6c0133a6b604ae
Author: Chris Paulson-Ellis <chris@paulson-ellis.org>
AuthorDate: Sat Aug 29 18:26:50 2020 +0100

    conn: check for connection being dead before reuse
    
    Prevents incorrect reuse of an HTTP connection that has been prematurely
    shutdown() by the server.
    
    Partial revert of 755083d00deb16
    
    Fixes #5884
    Closes #5893
---
 lib/url.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/url.c b/lib/url.c
index 48b08d7fc..8a7114a23 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1120,6 +1120,12 @@ ConnectionExists(struct Curl_easy *data,
         /* connect-only or to-be-closed connections will not be reused */
         continue;
 
+      if(extract_if_dead(check, data)) {
+        /* disconnect it */
+        (void)Curl_disconnect(data, check, /* dead_connection */TRUE);
+        continue;
+      }
+
       if(bundle->multiuse == BUNDLE_MULTIPLEX)
         multiplexed = CONN_INUSE(check);
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]