From c6cbae48857cfcf49736ef4a23f42da451853f39 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 23 May 2014 15:10:49 -0700 Subject: [PATCH] Generate a new instance_id when we reconnect the channel, so we look like an entirely different instance. --- static/cosmopolite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/cosmopolite.js b/static/cosmopolite.js index fd0c3f2..f44017e 100644 --- a/static/cosmopolite.js +++ b/static/cosmopolite.js @@ -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',