Closed jhaynie closed 9 years ago
too bad Titanium doesn't let us flush buffer after a send so we don't have to do this. Might be worth opening a FR for that. For now, this will split incoming result buffers.
Hey, you wrote the remote URL loading and you didn't put that code sample in a gist?! ;-P
Also to note, this only occurs if the whole block is pasted in. Line by line, or loaded, it works as expected.
As it turns out, it has nothing to do with the content of the code itself (XHR is not relevant). It is simply the fact that multiple lines are being copy/pasted and processed at the same time and the overlap is messing up the socket buffer, as you mentioned. I checked out the node.js REPL and it actually identifies a copy/paste and still forces it to be processed lines by line at the client level, rather than trying to handle it at the server level or in post-processing of the return values. I'm going to see if I can simply chop up incoming copy/paste fields to resolve this completely.
This code example;
will crash triple with: