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

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