From 9c2419d09c2b5af101a730917308d89dced0861a Mon Sep 17 00:00:00 2001 From: Harmon Date: Sat, 23 Jan 2021 13:51:06 -0600 Subject: [PATCH] Change Stream._thread to thread --- tweepy/streaming.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 716b1b7..5dfd05e 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -141,6 +141,7 @@ class Stream: self.running = False self.session = None + self.thread = None def _connect(self, endpoint, params=None, body=None): self.running = True @@ -226,9 +227,9 @@ class Stream: self.running = False def _threaded_connect(self, *args, **kwargs): - self._thread = Thread(target=self._connect, name="Tweepy Stream", - args=args, kwargs=kwargs, daemon=self.daemon) - self._thread.start() + self.thread = Thread(target=self._connect, name="Tweepy Stream", + args=args, kwargs=kwargs, daemon=self.daemon) + self.thread.start() def filter(self, follow=None, track=None, threaded=False, locations=None, stall_warnings=False, languages=None, filter_level=None): -- 2.25.1