diff --git a/ovos_core/intent_services/__init__.py b/ovos_core/intent_services/__init__.py index 8a0633be6fbf..747718db5e79 100644 --- a/ovos_core/intent_services/__init__.py +++ b/ovos_core/intent_services/__init__.py @@ -276,9 +276,16 @@ def handle_utterance(self, message): stopwatch = Stopwatch() + # get session + sess = SessionManager.get(message) + if sess.session_id == "default": + # Default session, check if it needs to be (re)-created + if sess.expired(): + sess = SessionManager.reset_default_session() + sess.lang = lang + # match match = None - sess = SessionManager.get(message) with stopwatch: # Loop through the matching functions until a match is found. for match_func in self.get_pipeline(session=sess): @@ -310,7 +317,8 @@ def handle_utterance(self, message): self.send_complete_intent_failure(message) # sync any changes made to the default session, eg by ConverseService - SessionManager.sync() + if sess.session_id == "default": + SessionManager.sync() return match, message.context, stopwatch except Exception as err: diff --git a/requirements/requirements.txt b/requirements/requirements.txt index cc4c4736b483..dbf3c2c1c613 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -6,7 +6,7 @@ combo-lock>=0.2.2, <0.3 padacioso~=0.2, >=0.2.1a8 adapt-parser>=1.0.0, <2.0.0 -ovos_bus_client~=0.0,>=0.0.6a7 + ovos-utils<0.1.0, >=0.0.35a7 ovos-plugin-manager<0.1.0, >=0.0.24a5 ovos-config~=0.0,>=0.0.11a9