mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 01:35:28 +03:00
More coderabbit ...
This commit is contained in:
parent
6a06ca1ed1
commit
b218963680
2 changed files with 4 additions and 4 deletions
|
@ -156,7 +156,7 @@ export class MSPQueueMonitor {
|
|||
* Check for alert conditions
|
||||
*/
|
||||
_checkAlerts() {
|
||||
const queueSize = this.msp.callbacks.length;
|
||||
const queueSize = this.msp.callbacks?.length ?? 0;
|
||||
|
||||
// Queue full alert
|
||||
const wasQueueFull = this.alerts.queueFull;
|
||||
|
@ -607,7 +607,7 @@ export class MSPQueueMonitor {
|
|||
}
|
||||
|
||||
// Clear instrumentation flag
|
||||
delete this.msp._mspQueueMonitorInstrumented;
|
||||
this.msp._mspQueueMonitorInstrumented = undefined;
|
||||
|
||||
this.listeners = [];
|
||||
|
||||
|
|
|
@ -92,10 +92,10 @@ export class MSPStressTest {
|
|||
}
|
||||
|
||||
this.monitor.stopMonitoring();
|
||||
this.monitor.destroy(); // Clean up MSP method patches and restore original behavior
|
||||
this.testResults = results;
|
||||
|
||||
const report = this.generateTestReport(results);
|
||||
// Now it’s safe to tear the monitor down
|
||||
this.monitor.destroy();
|
||||
console.log("\n📊 Stress Test Suite Complete");
|
||||
console.log(report.summary);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue