Skip to content

Commit

Permalink
Dev 1.6.0-dev.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligu committed Oct 13, 2024
1 parent a9562f6 commit 7d4e362
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/matterbridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,18 +630,17 @@ export class Matterbridge extends EventEmitter {
MatterbridgeDevice.bridgeMode = 'bridge';
this.log.debug(`Starting matterbridge in mode ${this.bridgeMode}`);
await this.startBridge();
await this.loadStartConfigurePlugins();
await this.startPlugins();
return;
}

// Start matterbridge in childbridge mode
if (hasParameter('childbridge') || (!hasParameter('bridge') && (await this.nodeContext?.get<string>('bridgeMode', '')) === 'childbridge')) {
this.bridgeMode = 'childbridge';
MatterbridgeDevice.bridgeMode = 'childbridge';
await this.loadStartConfigurePlugins();
this.log.debug(`Starting matterbridge in mode ${this.bridgeMode}`);
await this.startChildbridge();
await this.loadStartConfigurePlugins();
await this.startPlugins();
return;
}
}
Expand All @@ -655,7 +654,7 @@ export class Matterbridge extends EventEmitter {
*
* @returns {Promise<void>} A promise that resolves when all plugins have been loaded and configured.
*/
private async loadStartConfigurePlugins() {
private async startPlugins() {
// Check, load and start the plugins
for (const plugin of this.plugins) {
plugin.configJson = await this.plugins.loadConfig(plugin);
Expand Down

0 comments on commit 7d4e362

Please sign in to comment.