diff --git a/management/univention-management-console/src/univention/management/console/protocol/server.py b/management/univention-management-console/src/univention/management/console/protocol/server.py index f92dfc9..cd3f855 100644 --- a/management/univention-management-console/src/univention/management/console/protocol/server.py +++ b/management/univention-management-console/src/univention/management/console/protocol/server.py @@ -89,7 +89,7 @@ def _timeout_connection(self, state): """Closes the connection after a specified timeout""" state.time_remaining -= 1 - if state.time_remaining <= 0 and not state.requests: + if state.time_remaining <= 0 and not state.requests and not state.session.has_active_module_processes(): CORE.process('Connection timed out.') self._cleanup(state.socket) else: @@ -192,6 +192,7 @@ def _response(self, msg, state): CORE.info('The given response is invalid or not known (%s)' % (msg.id,)) return + state.reset_connection_timeout() try: data = str(msg) # there is no data from another request in the send queue diff --git a/management/univention-management-console/src/univention/management/console/protocol/session.py b/management/univention-management-console/src/univention/management/console/protocol/session.py index a51f2f9..dac1057 100644 --- a/management/univention-management-console/src/univention/management/console/protocol/session.py +++ b/management/univention-management-console/src/univention/management/console/protocol/session.py @@ -919,6 +919,10 @@ def __init__(self): self.__locale = None self._reload_acls_and_permitted_commands() + def has_active_module_processes(self): + if self.processor: + return self.processor._ProcessorBase__processes + def _reload_acls(self): """All unauthenticated requests are passed here. We need to set empty ACL's""" self.acls = ACLs()