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.
This commit is contained in:
Rob Crittenden committed 2009-11-18 14:13:08 -05:00
1 parent 55c62ac79a
commit 1e3ba09514
1 file changed
+5
+5
View File
@@ -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