push_stream_longpolling_connection_ttl 5s;
push_stream_subscriber_connection_ttl 5s;
But It has had no effect thus far. I know that
push_stream_longpolling seems to be working as expected, because the
http response is received after 5 seconds of no activity, but the
response still takes 5 min to download the body after the header is
received. Thanks for any help in advance.
-Dan
function listen(cid) {
$.ajax({
url: "http://foo.com/lp/"+cid,
dataType: 'jsonp',
jsonp:false,
jsonpCallback: "processMessage"
})
.fail(function(){
//catch 304, 404, 500, etc. Jquery considers a 304 a failure
listen(cid);
});
}
function processMessage(data){
var id = data[0].id;
var channel = data[0].channel;
var message_data = jQuery.parseJSON(data[0].message);
//listen again
listen(channel);
}
The key is that jquery seems to interpret a 304 as a failure.
-Dan