Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
e4999c06
Commit
e4999c06
authored
Feb 16, 2015
by
Paul van der Linden
Browse files
send out keep alive
parent
3ee7a5ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/streaming.py
View file @
e4999c06
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment