Rename Stream.on_disconnect to on_disconnect_message
authorHarmon <Harmon758@gmail.com>
Sun, 24 Jan 2021 14:45:02 +0000 (08:45 -0600)
committerHarmon <Harmon758@gmail.com>
Sun, 24 Jan 2021 14:45:02 +0000 (08:45 -0600)
tweepy/streaming.py

index d94a4f1992890cbff43f99767c01db259351f324..6e1a0db6bdffd69ff9da9652e00219c860bf84e8 100644 (file)
@@ -227,7 +227,7 @@ class Stream:
             delete = data['delete']['status']
             return self.on_delete(delete['id'], delete['user_id'])
         if 'disconnect' in data:
-            return self.on_disconnect(data['disconnect'])
+            return self.on_disconnect_message(data['disconnect'])
         if 'limit' in data:
             return self.on_limit(data['limit']['track'])
         if 'scrub_geo' in data:
@@ -249,7 +249,7 @@ class Stream:
         """Called when a delete notice arrives for a status"""
         log.debug("Received status deletion notice: %d", status_id)
 
-    def on_disconnect(self, notice):
+    def on_disconnect_message(self, notice):
         """Called when twitter sends a disconnect notice
 
         Disconnect codes are listed here: