I’ve made a reproduction case here: https://jsfiddle.net/qzypg36d/ – it uses your JsFiddle example from the docs, but connects to a node js server that demonstrates a contrived but reliable reproduction case of the kind of response I’m talking about – code is here: https://github.com/siteminder-au/flexmonster-failure-repro.
The real use case here is that we’re connecting to a JSON service that streams data on the fly out of a mysql database – in big queries, it’s quite possible for the mysql db to find all the data that matches the query at the start of the stream and send that through, but continue paging through the potential result set and find no rows that match, and hence return no objects in the last 4+ seconds of the query before it finishes and closes the stream.
This setup works great for us outside of this problem – unfortunately we didn’t notice it until we’d already gone into production and it started to be noticed by customers, so it’d be good if we could fix it quickly. I think we might be able to work around it by holding onto the last object we see and only sending that down the stream just before the stream closes – unless you can think of a better work around?
Thank you for posting your question and preparing a detailed sample.
Our team will investigate this behavior and provide a fix with our upcoming release on ETA May 17th.
In the meantime, the workaround you’ve mentioned sounds reasonable – perhaps try using it until a proper fix is released?
Please let us know if this works for you.
Great will do, thanks Mykhailo!