diff options
Diffstat (limited to 'swiftclient/client.py')
| -rw-r--r-- | swiftclient/client.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py index 3bbbc54..155c8cb 100644 --- a/swiftclient/client.py +++ b/swiftclient/client.py @@ -1072,6 +1072,14 @@ class Connection(object): self.insecure = insecure self.ssl_compression = ssl_compression + def close(self): + if self.http_conn and type(self.http_conn) is tuple\ + and len(self.http_conn) > 1: + conn = self.http_conn[1] + if hasattr(conn, 'close') and callable(conn.close): + conn.close() + self.http_conn = None + def get_auth(self): return get_auth(self.authurl, self.user, self.key, snet=self.snet, |
