session bug fix

This commit is contained in:
lockbitchat
2025-10-13 11:13:11 -04:00
parent 45de8ce285
commit d292c84829
16 changed files with 3819 additions and 58 deletions
+27 -27
View File
@@ -6709,41 +6709,41 @@ async processMessage(data) {
// Method for automatic feature enablement with stability check
async autoEnableSecurityFeatures() {
this._secureLog('info', 'Starting graduated security activation - all features enabled');
const checkStability = () => {
const isStable = this.isConnected() &&
this.isVerified &&
this.connectionAttempts === 0 &&
this.messageQueue.length === 0 &&
this.peerConnection?.connectionState === 'connected';
return isStable;
};
await this.calculateAndReportSecurityLevel();
this.notifySecurityUpgrade(1);
const checkStability = () => {
const isStable = this.isConnected() &&
this.isVerified &&
this.connectionAttempts === 0 &&
this.messageQueue.length === 0 &&
this.peerConnection?.connectionState === 'connected';
return isStable;
};
await this.calculateAndReportSecurityLevel();
this.notifySecurityUpgrade(1);
// Enable all security stages progressively
setTimeout(async () => {
if (checkStability()) {
this.enableStage2Security();
await this.calculateAndReportSecurityLevel();
setTimeout(async () => {
if (checkStability()) {
this.enableStage3Security();
await this.calculateAndReportSecurityLevel();
setTimeout(async () => {
if (checkStability()) {
this.enableStage4Security();
await this.calculateAndReportSecurityLevel();
}
}, 20000);
}
}, 15000);
setTimeout(async () => {
if (checkStability()) {
this.enableStage3Security();
await this.calculateAndReportSecurityLevel();
setTimeout(async () => {
if (checkStability()) {
this.enableStage4Security();
await this.calculateAndReportSecurityLevel();
}
}, 20000);
}
}, 15000);
}
}, 10000);
}
}
// ============================================
// CONNECTION MANAGEMENT WITH ENHANCED SECURITY