--- googlecode.com/svn/trunk/public_html/stream.html 2008/02/28 00:21:39 55
+++ googlecode.com/svn/trunk/public_html/stream.html 2008/11/27 00:33:21 62
@@ -14,10 +14,13 @@
}
function newXmlHttp() {
- try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
- try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
- try { return new XMLHttpRequest(); } catch(e) {}
- return null;
+ var xhr = null;
+ try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {
+ try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {
+ try { xhr = new XMLHttpRequest(); } catch(e) { return false }
+ }
+ }
+ return xhr;
}
function startstream() {
@@ -39,6 +42,7 @@
}
}
streamreq.send(null);
+ parent.Meteor.lastrequest = parent.Meteor.time();
}
function extractEvents(responsestr) {
@@ -50,6 +54,7 @@
y = newdata.indexOf(""+"script>", x);
if (y != -1) {
eval(newdata.substring((x+8),y));
+ if (typeof newdata == 'undefined') break; // If message was eof() then we're now in a freed script
newdata = newdata.substring(y+9);
} else {
@@ -65,7 +70,6 @@
}
-
startstream();