diff --git a/platypush/backend/__init__.py b/platypush/backend/__init__.py index d5b976543e..f2cbc4d01e 100644 --- a/platypush/backend/__init__.py +++ b/platypush/backend/__init__.py @@ -50,7 +50,7 @@ class Backend(Thread, EventGenerator): self._thread_name = self.__class__.__name__ EventGenerator.__init__(self) - Thread.__init__(self, name=self._thread_name) + Thread.__init__(self, name=self._thread_name, daemon=True) # If no bus is specified, create an internal queue where # the received messages will be pushed @@ -71,8 +71,6 @@ class Backend(Thread, EventGenerator): if 'logging' in kwargs: self.logger.setLevel(getattr(logging, kwargs.get('logging').upper())) - Thread.__init__(self) - def on_message(self, msg): """ Callback when a message is received on the backend.