Blame SOURCES/BZ-853432-single-conn-reset.patch

babe2e
From 93ad446fc6533304e33b231cd5786572773440b9 Mon Sep 17 00:00:00 2001
babe2e
From: Zdenek Pavlas <zpavlas@redhat.com>
babe2e
Date: Mon, 21 Oct 2013 16:52:53 +0200
babe2e
Subject: [PATCH] single-conn mode: Kill the cached idle connection. BZ 853432
babe2e
babe2e
The multi-downloader manages connections as necessary, caching
babe2e
at most one downloader per host. But there's one more connection,
babe2e
used by the legacy downloader.  In case keepalive=1 (default),
babe2e
it's still connected, possibly to the same connection-limited
babe2e
host.  Kill it.
babe2e
---
babe2e
 urlgrabber/grabber.py | 3 +++
babe2e
 1 file changed, 3 insertions(+)
babe2e
babe2e
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
babe2e
index b004f4d..d06cdae 100644
babe2e
--- a/urlgrabber/grabber.py
babe2e
+++ b/urlgrabber/grabber.py
babe2e
@@ -2221,6 +2221,9 @@ def parallel_wait(meter=None):
babe2e
                 # Turn on the max_connections=1 override. BZ 853432
babe2e
                 if DEBUG: DEBUG.info('max_connections(%s) %s => 1', key, limit)
babe2e
                 single.add(key)
babe2e
+                # When using multi-downloader the parent's _curl_cache
babe2e
+                # object is idle. Kill it, as it might use keepalive=1.
babe2e
+                reset_curl_obj()
babe2e
 
babe2e
             retry = opts.retry or 0
babe2e
             if opts.failure_callback:
babe2e
-- 
babe2e
1.7.11.7
babe2e