From 8f622971f2a36f49ad54b70cf4f98464487a4716 Mon Sep 17 00:00:00 2001 From: Harmon Date: Tue, 19 Jan 2021 03:41:55 -0600 Subject: [PATCH] Rename StreamListener.on_timeout to on_connection_error --- tweepy/streaming.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 66ac999..7104000 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -90,8 +90,8 @@ class StreamListener: """Called when a non-200 status code is returned""" return False - def on_timeout(self): - """Called when stream connection times out""" + def on_connection_error(self): + """Called when stream connection errors or times out""" return def on_disconnect(self, notice): @@ -257,7 +257,7 @@ class Stream: if isinstance(exc, ssl.SSLError): if not (exc.args and 'timed out' in str(exc.args[0])): raise - if self.listener.on_timeout() is False: + if self.listener.on_connection_error() is False: break if self.running is False: break -- 2.25.1