Improve Stream.running check in Stream._connect
authorHarmon <Harmon758@gmail.com>
Sun, 24 Jan 2021 13:58:39 +0000 (07:58 -0600)
committerHarmon <Harmon758@gmail.com>
Sun, 24 Jan 2021 13:58:39 +0000 (07:58 -0600)
tweepy/streaming.py

index ae6fb30cfe11af35a94a0c62e7eb29c6c040aea3..05766e1fd9e3e5b329d4be5528eec2564acc223a 100644 (file)
@@ -115,7 +115,7 @@ class Stream:
                         if not (exc.args and 'timed out' in str(exc.args[0])):
                             raise
                     self.on_connection_error()
-                    if self.running is False:
+                    if not self.running:
                         break
                     sleep(network_error_wait)
                     network_error_wait = min(