elif 'disconnect' in data:
if self.on_disconnect(data['disconnect']) is False:
return False
+ elif 'warning' in data:
+ if self.on_warning(data['warning']) is False:
+ return False
else:
logging.error("Unknown message type: " + str(raw_data))
return
def on_limit(self, track):
- """Called when a limitation notice arrvies"""
+ """Called when a limitation notice arrives"""
return
def on_error(self, status_code):
https://dev.twitter.com/docs/streaming-apis/messages#Disconnect_messages_disconnect
"""
return
+
+ def on_warning(self, notice):
+ """Called when a disconnection warning message arrives"""
+ return
class ReadBuffer(object):