diff --git a/platypush/backend/http/app/mixins/__init__.py b/platypush/backend/http/app/mixins/__init__.py index eec40e6b1..b036e1e0d 100644 --- a/platypush/backend/http/app/mixins/__init__.py +++ b/platypush/backend/http/app/mixins/__init__.py @@ -65,8 +65,7 @@ class PubSubMixin: with self._pubsub_lock: # Close and free the pub/sub object if it has no active subscriptions. if self._pubsub is not None and len(self._subscriptions) == 0: - self._pubsub.close() - self._pubsub = None + self._pubsub_close() @staticmethod def _serialize(data: MessageType) -> bytes: