summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/common/http.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/leap/common/http.py b/src/leap/common/http.py
index d4a214c..8d22f2c 100644
--- a/src/leap/common/http.py
+++ b/src/leap/common/http.py
@@ -80,6 +80,7 @@ class HTTPClient(object):
policy = get_compatible_ssl_context_factory(cert_file)
+ self._pool = pool
self._agent = Agent(
reactor,
policy,
@@ -110,6 +111,12 @@ class HTTPClient(object):
d.addCallback(readBody)
return d
+ def close(self):
+ """
+ Close any cached connections.
+ """
+ self._pool.closeCachedConnections()
+
class StringBodyProducer(object):
"""
A producer that writes the body of a request to a consumer.