aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/twitter/twitter_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/twitter/twitter_lib.c')
-rw-r--r--protocols/twitter/twitter_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index f1274952..ad019e1d 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -1018,7 +1018,6 @@ static void twitter_http_stream(struct http_request *req)
return;
}
- ic->flags |= OPT_PONGED;
td = ic->proto_data;
if ((req->flags & HTTPC_EOF) || !req->reply_body) {
@@ -1036,6 +1035,10 @@ static void twitter_http_stream(struct http_request *req)
return;
}
+ if (req == td->stream) {
+ ic->flags |= OPT_PONGED;
+ }
+
/* MUST search for CRLF, not just LF:
https://dev.twitter.com/docs/streaming-apis/processing#Parsing_responses */
if (!(nl = strstr(req->reply_body, "\r\n"))) {