Merge branch 'master' of github.com:meteor/meteor

This commit is contained in:
David Greenspan
2012-03-08 10:17:24 -08:00

View File

@@ -239,7 +239,12 @@ _.extend(Meteor._Stream.prototype, {
var self = this;
self._cleanup_socket(); // cleanup the old socket, if there was one.
self.socket = new SockJS(self.url, undefined, {debug: false});
self.socket = new SockJS(self.url, undefined, {
debug: false, protocols_whitelist: [
// only allow polling protocols. no websockets or streaming.
// streaming makes safari spin, and websockets hurt chrome.
'xdr-polling', 'xhr-polling', 'iframe-xhr-polling', 'jsonp-polling'
]});
self.socket.onmessage = function (data) {
// first message we get when we're connecting goes to _connected,
// which connects us. All subsequent messages (while connected) go to