fix(core): Ensure init before checking leader or follower in multi-main scenario (#7621)
This PR ensures `MultiMainInstancePublisher` is initialized before checking if the instance is leader or follower. Followers skip license init, license check, and pruning start and stop.
This commit is contained in:
@@ -28,6 +28,8 @@ export class MultiMainInstancePublisher extends SingleMainInstancePublisher {
|
||||
private leaderCheckInterval: NodeJS.Timer | undefined;
|
||||
|
||||
async init() {
|
||||
if (this.initialized) return;
|
||||
|
||||
await this.initPublisher();
|
||||
|
||||
this.initialized = true;
|
||||
|
||||
Reference in New Issue
Block a user