Disregard return value from Stream.on_request_error
authorHarmon <Harmon758@gmail.com>
Sun, 24 Jan 2021 13:55:12 +0000 (07:55 -0600)
committerHarmon <Harmon758@gmail.com>
Sun, 24 Jan 2021 13:55:12 +0000 (07:55 -0600)
tweepy/streaming.py

index 14af2ce0b04716a7ba4e031326a95c33713159b1..bbc65ab014bc81eae4427f21daa3ac3369671439 100644 (file)
@@ -74,7 +74,8 @@ class Stream:
                         verify=self.verify, proxies=self.proxies
                     ) as resp:
                         if resp.status_code != 200:
-                            if self.on_request_error(resp.status_code) is False:
+                            self.on_request_error(resp.status_code)
+                            if not self.running:
                                 break
                             error_count += 1
                             if resp.status_code == 420: