clearInterval(this.retrySendmove);
if (!!this.clockUpdate)
clearInterval(this.clockUpdate);
+ this.conn.removeEventListener("message", this.socketMessageListener);
+ this.conn.removeEventListener("close", this.socketCloseListener);
this.send("disconnect");
+ this.conn = null;
},
visibilityChange: function() {
// TODO: Use document.hidden? https://webplatform.news/issues/2019-03-27
case "connect":
if (!this.people[data.from]) {
this.people[data.from] = { focus: true };
- this.$forceUpdate(); //TODO: shouldn't be required
this.newConnect[data.from] = true; //for self multi-connects tests
this.send("askidentity", { target: data.from });
+ } else if (!this.people[data.from].focus) {
+ this.people[data.from].focus = true;
+ this.$forceUpdate(); //TODO: shouldn't be required
}
break;
case "disconnect":