projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ee7a5a
)
send out keep alive
author
Paul van der Linden
<mail@paultjuh.org>
Mon, 16 Feb 2015 20:59:20 +0000
(20:59 +0000)
committer
Paul van der Linden
<mail@paultjuh.org>
Mon, 16 Feb 2015 20:59:20 +0000
(20:59 +0000)
tweepy/streaming.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/streaming.py
b/tweepy/streaming.py
index 956f29bc14b028709a6c012f51a248d1fe79bd00..677e3f6fad711665883d408b51ca844b8d2517fe 100644
(file)
--- a/
tweepy/streaming.py
+++ b/
tweepy/streaming.py
@@
-79,6
+79,10
@@
class StreamListener(object):
else:
logging.error("Unknown message type: " + str(raw_data))
+ def keep_alive(self):
+ """Called when a keep-alive arrived"""
+ return
+
def on_status(self, status):
"""Called when a new status arrives"""
return
@@
-293,7
+297,7
@@
class Stream(object):
while True:
line = buf.read_line().strip()
if not line:
-
pass
# keep-alive new lines are expected
+
self.listener.keep_alive()
# keep-alive new lines are expected
elif line.isdigit():
length = int(line)
break