fix(core): License should ignore empty input on onFeatureChange (#13912)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-03-13 18:08:37 +01:00
committed by GitHub
parent 31493a0cac
commit dedcdbd314

View File

@@ -131,11 +131,18 @@ export class License {
}
async onFeatureChange(_features: TFeatures): Promise<void> {
const { isMultiMain, isLeader } = this.instanceSettings;
if (Object.keys(_features).length === 0) {
this.logger.error('Empty license features recieved', { isMultiMain, isLeader });
return;
}
this.logger.debug('License feature change detected', _features);
this.checkIsLicensedForMultiMain(_features);
if (this.instanceSettings.isMultiMain && !this.instanceSettings.isLeader) {
if (isMultiMain && !isLeader) {
this.logger
.scoped(['scaling', 'multi-main-setup', 'license'])
.debug('Instance is not leader, skipping sending of "reload-license" command...');