From 1e3ba09514088fa7e232ca05fe32efe6c5a33dfd Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 18 Nov 2009 14:13:08 -0500 Subject: Add fail-safe so any kind of exception is handled in XML-RPC server. If an exception is not handled here then the context isn't destroyed leaving at least an LDAP connection dangling. This means the next time this thread/process tries to handle a connection it will fail because a context already exists. --- ipalib/backend.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ipalib/backend.py') diff --git a/ipalib/backend.py b/ipalib/backend.py index 7c964b799..2436ce052 100644 --- a/ipalib/backend.py +++ b/ipalib/backend.py @@ -123,6 +123,11 @@ class Executioner(Backend): 'non-public: %s: %s', e.__class__.__name__, str(e) ) error = InternalError() + except Exception, e: + self.exception( + 'unhandled exception: %s: %s', e.__class__.__name__, str(e) + ) + error = InternalError() destroy_context() if error is None: return result -- cgit