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