From 5107ae8dd16745dcd386a8903610d6518fde588b Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 22 Jan 2021 12:53:12 -0600 Subject: [PATCH] Pass daemon directly when initializing Thread in Stream --- tweepy/streaming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 405f984..71a0a68 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -240,8 +240,8 @@ class Stream: def _start(self, threaded=False, *args, **kwargs): self.running = True if threaded: - self._thread = Thread(target=self._run, args=args, kwargs=kwargs) - self._thread.daemon = self.daemon + self._thread = Thread(target=self._run, args=args, kwargs=kwargs, + daemon=self.daemon) self._thread.start() else: self._run(*args, **kwargs) -- 2.25.1