|
|
b215bf |
From 8699e821282802626210fd1d78f982975611f3ed Mon Sep 17 00:00:00 2001
|
|
|
b215bf |
From: Lokesh Mandvekar <lsm5@fedoraproject.org>
|
|
|
b215bf |
Date: Fri, 23 Jan 2015 17:43:42 -0500
|
|
|
b215bf |
Subject: [PATCH] remove lock for rhel7
|
|
|
b215bf |
|
|
|
b215bf |
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
|
|
|
b215bf |
---
|
|
|
b215bf |
docker/unixconn/unixconn.py | 17 ++++++++---------
|
|
|
b215bf |
1 file changed, 8 insertions(+), 9 deletions(-)
|
|
|
b215bf |
|
|
|
b215bf |
diff --git a/docker/unixconn/unixconn.py b/docker/unixconn/unixconn.py
|
|
|
b215bf |
index 1f18060..57c98a5 100644
|
|
|
b215bf |
--- a/docker/unixconn/unixconn.py
|
|
|
b215bf |
+++ b/docker/unixconn/unixconn.py
|
|
|
b215bf |
@@ -72,15 +72,14 @@ class UnixAdapter(requests.adapters.HTTPAdapter):
|
|
|
b215bf |
super(UnixAdapter, self).__init__()
|
|
|
b215bf |
|
|
|
b215bf |
def get_connection(self, socket_path, proxies=None):
|
|
|
b215bf |
- with self.pools.lock:
|
|
|
b215bf |
- pool = self.pools.get(socket_path)
|
|
|
b215bf |
- if pool:
|
|
|
b215bf |
- return pool
|
|
|
b215bf |
-
|
|
|
b215bf |
- pool = UnixHTTPConnectionPool(
|
|
|
b215bf |
- self.base_url, socket_path, self.timeout
|
|
|
b215bf |
- )
|
|
|
b215bf |
- self.pools[socket_path] = pool
|
|
|
b215bf |
+ pool = self.pools.get(socket_path)
|
|
|
b215bf |
+ if pool:
|
|
|
b215bf |
+ return pool
|
|
|
b215bf |
+
|
|
|
b215bf |
+ pool = UnixHTTPConnectionPool(
|
|
|
b215bf |
+ self.base_url, socket_path, self.timeout
|
|
|
b215bf |
+ )
|
|
|
b215bf |
+ self.pools[socket_path] = pool
|
|
|
b215bf |
|
|
|
b215bf |
return pool
|
|
|
b215bf |
|
|
|
b215bf |
--
|
|
|
b215bf |
1.8.3.1
|
|
|
b215bf |
|