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:
1 parent
55c62ac79a
commit
1e3ba09514
1 file changed
+5
@@ -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
|
||||
|
||||
Reference in new issue
Block a user