lyricat/Hotot — pull request #523 by tante (2013-02-27 13:22:45+00:00)
Title: Fix for interrupted Streams handling ( Issue #473)

The embedded webkit instance seems (at least in linux) to trigger the
"onreadystatechange" in the middle of handling data leading to the streaming to
stop because of JSON Parse errors (as described in Issue #473).

This patch introduces a new variable to store the broken response to prepend it
with the next incoming data forming a proper JSON string.

The stream continues to run, and updates, broken replies just tend to lag a
second due to having to wait for coming data.

This is not a perfect fix but rather a workaround to keep streaming running
(especially important due to API call limits coming).