зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1137813 - Part 4. Don't log the cleanup event as the server doesn't accept it after the room has been left. r=mikedeboer
This commit is contained in:
Родитель
4926ad6112
Коммит
fb94500173
|
@ -440,7 +440,9 @@ loop.OTSdkDriver = (function() {
|
|||
case "Session.connectionDestroyed":
|
||||
this._metrics.connections--;
|
||||
if (clientType === "local") {
|
||||
state = "cleanup";
|
||||
// Don't log this, as the server doesn't accept it after
|
||||
// the room has been left.
|
||||
return;
|
||||
} else if (!this._metrics.connections) {
|
||||
state = "waiting";
|
||||
}
|
||||
|
|
|
@ -420,23 +420,6 @@ describe("loop.OTSdkDriver", function () {
|
|||
sinon.assert.calledOnce(publisher.destroy);
|
||||
});
|
||||
|
||||
it("should dispatch a ConnectionStatus action", function() {
|
||||
driver.session = session;
|
||||
driver._metrics.connections = 1;
|
||||
|
||||
driver.disconnectSession();
|
||||
|
||||
sinon.assert.calledOnce(dispatcher.dispatch);
|
||||
sinon.assert.calledWithExactly(dispatcher.dispatch,
|
||||
new sharedActions.ConnectionStatus({
|
||||
event: "Session.connectionDestroyed",
|
||||
state: "cleanup",
|
||||
connections: 0,
|
||||
sendStreams: 0,
|
||||
recvStreams: 0
|
||||
}));
|
||||
});
|
||||
|
||||
it("should call _noteConnectionLengthIfNeeded with connection duration", function() {
|
||||
driver.session = session;
|
||||
var startTime = 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче