|
@@ -37,7 +37,7 @@ function XMPP(options, token) {
|
37
|
37
|
this.eventEmitter = new EventEmitter();
|
38
|
38
|
this.connection = null;
|
39
|
39
|
this.disconnectInProgress = false;
|
40
|
|
- this.performanceTimes = {status: []};
|
|
40
|
+ this.performanceTimes = {};
|
41
|
41
|
this.forceMuted = false;
|
42
|
42
|
this.options = options;
|
43
|
43
|
initStrophePlugins(this);
|
|
@@ -62,9 +62,7 @@ XMPP.prototype.getConnection = function () { return this.connection; };
|
62
|
62
|
*/
|
63
|
63
|
XMPP.prototype.connectionHandler = function (password, status, msg) {
|
64
|
64
|
var now = window.performance.now();
|
65
|
|
- this.performanceTimes["status"].push(
|
66
|
|
- {state: Strophe.getStatusString(status),
|
67
|
|
- time: now});
|
|
65
|
+ this.performanceTimes[Strophe.getStatusString(status).toLowerCase()] = now;
|
68
|
66
|
logger.log("(TIME) Strophe " + Strophe.getStatusString(status) +
|
69
|
67
|
(msg ? "[" + msg + "]" : "") + ":\t", now);
|
70
|
68
|
if (status === Strophe.Status.CONNECTED ||
|