pass hostname to all new Session

pull/258/head
Julian Gong 2019-05-20 13:12:34 -05:00
parent 46bf79bddf
commit 6b10082ed9
1 changed files with 2 additions and 2 deletions

View File

@ -453,7 +453,7 @@ export class OpenVidu {
console.log("Available session '" + storedSession.sessionId + "' info fetched. Any change: " + changed); console.log("Available session '" + storedSession.sessionId + "' info fetched. Any change: " + changed);
hasChanged = hasChanged || changed; hasChanged = hasChanged || changed;
} else { } else {
this.activeSessions.push(new Session(session)); this.activeSessions.push(new Session(this.hostname, session));
console.log("New session '" + session.sessionId + "' info fetched"); console.log("New session '" + session.sessionId + "' info fetched");
hasChanged = true; hasChanged = true;
} }
@ -638,7 +638,7 @@ export class OpenVidu {
sessionChanges[storedSession.sessionId] = changed; sessionChanges[storedSession.sessionId] = changed;
globalChanges = globalChanges || changed; globalChanges = globalChanges || changed;
} else { } else {
const newSession = new Session(session); const newSession = new Session(this.hostname, session);
newSession.activeConnections.forEach(connection => { newSession.activeConnections.forEach(connection => {
addWebRtcStatsToConnections(connection, session.connections.content); addWebRtcStatsToConnections(connection, session.connections.content);
}); });