Generate a new instance_id when we reconnect the channel, so we look like an entirely different instance.
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user