Generate a new instance_id when we reconnect the channel, so we look like an entirely different instance.

This commit is contained in:
Ian Gulliver
2014-05-23 15:10:49 -07:00
parent b5bce48df6
commit c6cbae4885

View File

@@ -45,8 +45,6 @@ var Cosmopolite = function(callbacks, urlPrefix, namespace) {
this.subscriptions_ = {};
this.profilePromises_ = [];
this.instanceId_ = this.uuid_();
this.messageQueueKey_ = this.namespace_ + ':message_queue';
if (this.messageQueueKey_ in localStorage) {
var messages = JSON.parse(localStorage[this.messageQueueKey_]);
@@ -596,6 +594,8 @@ Cosmopolite.prototype.createChannel_ = function() {
return;
}
this.instanceId_ = this.uuid_();
var rpcs = [
{
'command': 'createChannel',