From d3e52ba944d010d311587682a132398bab45f9bf Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 1 Aug 2020 17:20:46 +0200 Subject: [PATCH] Backends should be started with daemon=True --- platypush/backend/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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.