Redacted debugState for WebSocketConnection and DemandMatcher
This commit is contained in:
parent
10abaa1724
commit
52bdc2eb3c
|
@ -420,6 +420,20 @@ function DemandMatcher(projection, metaLevel, options) {
|
|||
this.currentSupply = {};
|
||||
}
|
||||
|
||||
DemandMatcher.prototype.debugState = function () {
|
||||
return {
|
||||
demandPattern: this.demandPattern,
|
||||
supplyPattern: this.supplyPattern,
|
||||
metaLevel: this.metaLevel,
|
||||
demandLevel: this.demandLevel,
|
||||
supplyLevel: this.supplyLevel,
|
||||
demandSideIsSubscription: this.demandSideIsSubscription
|
||||
|
||||
// , currentDemand: this.currentDemand
|
||||
// , currentSupply: this.currentSupply
|
||||
};
|
||||
};
|
||||
|
||||
DemandMatcher.prototype.boot = function () {
|
||||
var observerLevel = 1 + Math.max(this.demandLevel, this.supplyLevel);
|
||||
World.updateRoutes([sub(this.demandPattern, this.metaLevel, observerLevel),
|
||||
|
|
|
@ -38,6 +38,20 @@ function WebSocketConnection(label, wsurl, shouldReconnect) {
|
|||
this.pingTimer = null;
|
||||
}
|
||||
|
||||
WebSocketConnection.prototype.debugState = function () {
|
||||
return {
|
||||
label: this.label,
|
||||
sendsAttempted: this.sendsAttempted,
|
||||
sendsTransmitted: this.sendsTransmitted,
|
||||
receiveCount: this.receiveCount,
|
||||
wsurl: this.wsurl,
|
||||
shouldReconnect: this.shouldReconnect,
|
||||
reconnectDelay: this.reconnectDelay,
|
||||
connectionCount: this.connectionCount,
|
||||
activityTimestamp: this.activityTimestamp
|
||||
};
|
||||
};
|
||||
|
||||
WebSocketConnection.prototype.clearHeartbeatTimers = function () {
|
||||
if (this.idleTimer) { clearTimeout(this.idleTimer); this.idleTimer = null; }
|
||||
if (this.pingTimer) { clearTimeout(this.pingTimer); this.pingTimer = null; }
|
||||
|
|
Loading…
Reference in New Issue