From 25cf4a2e76ff976fe15029f9da7e4e3555f203d4 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mar 20 2017 18:24:28 +0000 Subject: 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 Reviewed-By: Tomas Krizek --- diff --git a/ipalib/rpc.py b/ipalib/rpc.py index 499ddeb..106cabe 100644 --- a/ipalib/rpc.py +++ b/ipalib/rpc.py @@ -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: