diff --git a/src/zinolib/controllers/zino1.py b/src/zinolib/controllers/zino1.py index 06c4f93..6b4b660 100644 --- a/src/zinolib/controllers/zino1.py +++ b/src/zinolib/controllers/zino1.py @@ -298,7 +298,7 @@ def close_push_channel(session): @classmethod def close_session(cls, session): - cls.close_push_channel() + cls.close_push_channel(session) session.request.close() session.request = None return None @@ -492,6 +492,7 @@ class Zino1EventManager(EventManager): _history_adapter = HistoryAdapter _log_adapter = LogAdapter removed_ids: Set[int] = set() + config = None @property def is_authenticated(self): @@ -520,10 +521,13 @@ def _verify_session(self, quiet=False): @classmethod def configure(cls, config): session = cls._session_adapter.create_session(config) - return cls(session) + classobj = cls(session) + classobj.config = config + return classobj def connect(self): - self._verify_session() + if not self._verify_session(quiet=True): + self.session = self._session_adapter.create_session(self.config) self.session = self._session_adapter.connect_session(self.session) def connect_push_channel(self):