Skip to content

Commit

Permalink
Restored rememberTransport to default
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Sep 20, 2010
1 parent aa8afe4 commit c73d292
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/socket.js
Expand Up @@ -24,7 +24,7 @@
timeout: 25000
}
},
rememberTransport: false
rememberTransport: true
};
for (var i in options)
if (this.options.hasOwnProperty(i))
Expand All @@ -39,7 +39,7 @@
Socket.prototype.getTransport = function(){
var transports = this.options.transports, match;
if (this.options.rememberTransport){
match = this.options.document.cookie.match('(?:^|;)\\s*socket\.io=([^;]*)');
match = this.options.document.cookie.match('(?:^|;)\\s*socketio=([^;]*)');
if (match) transports = [decodeURIComponent(match[1])];
}
for (var i = 0, transport; transport = transports[i]; i++){
Expand Down Expand Up @@ -115,7 +115,7 @@
this.connected = true;
this.connecting = false;
this._doQueue();
if (this.options.rememberTransport) this.options.document.cookie = 'socket.io=' + encodeURIComponent(this.transport.type);
if (this.options.rememberTransport) this.options.document.cookie = 'socketio=' + encodeURIComponent(this.transport.type);
this.fire('connect');
};

Expand Down

0 comments on commit c73d292

Please sign in to comment.