Use connection keep-alive

Do not forcefully close the connection after every request. This enables
HTTP connection keep-alive, also known as persistent TCP and TLS/SSL
connection. Keep-alive speed up consecutive HTTP requests by 15% (for
local, low-latency network connections to a fast server) to multiple
times (high latency connections or remote peers).

https://pagure.io/freeipa/issue/6641

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
This commit is contained in:
Christian Heimes 2017-03-20 08:47:41 +01:00 committed by Tomas Krizek
parent 0bb858ea77
commit 7beb6d1cad
No known key found for this signature in database
GPG Key ID: 22A2A94B5E49415A

View File

@ -686,7 +686,7 @@ class KerbTransport(SSLTransport):
return self.parse_response(response)
except gssapi.exceptions.GSSError as e:
self._handle_exception(e)
finally:
except BaseException:
self.close()
if six.PY3: