From 2eda088d402a10b59daff51b2af763ec1e809e33 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 24 Jan 2021 07:58:39 -0600 Subject: [PATCH] Improve Stream.running check in Stream._connect --- tweepy/streaming.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( -- 2.25.1