You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm doing a project and pooling for a nonexisting hashtag. Your server code crashes 1 minute after the 1st connection attempt if no tweet are available after the 1st minute.
I've been searching for path: /1/statuses/filter.json?track=some_random_hastag_no_one_will_ever_use.
The idea is that this search will not return anything and the browser will close the connection. I got a fix working earlier today. Maybe you can include that.
//stream.js [server side]result.on('data',function(chunk){if(chunk=='\r\n'){//got a keepaliveres.write("event: keepalive\n");}else{jsonTwitter.feed(chunk);}});//main.js [client side]source.addEventListener('keepalive',function(e){//you don't actually have to do anything with this.console.log("keepalive received");});
I'm doing a project and pooling for a nonexisting hashtag. Your server code crashes 1 minute after the 1st connection attempt if no tweet are available after the 1st minute.
Your server implementation doesn't take keepalives in consideration.
https://dev.twitter.com/docs/streaming-apis/connecting#Stalls
Will throw
and crash.
I'm in the process of writing something that catches keepalives but I'm brand new at node.js so I'm not ready to submit a pull request just yet.
The text was updated successfully, but these errors were encountered: