From: Harmon Date: Sun, 24 Jan 2021 13:58:39 +0000 (-0600) Subject: Improve Stream.running check in Stream._connect X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2eda088d402a10b59daff51b2af763ec1e809e33;p=tweepy.git Improve Stream.running check in Stream._connect --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index ae6fb30..05766e1 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -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(