Added additional reactor handling

This commit is contained in:
2025-07-24 15:09:04 +02:00
parent 475caa90db
commit 71643375fc

View File

@@ -233,7 +233,18 @@ class ChildRegistrationUtils {
this.logger.warn("Invalid reactor provided.");
return;
}
// this is poor code, it should be fixed at some point
if (this.mainClass?.upstreamReactor){
this.mainClass.upstreamReactor = reactor; // Add reactor to the main class
} else {
if (positionVsParent == "downstream") {
this.mainClass.reactors[0] = reactor;
}
if (positionVsParent == "upstream") {
this.mainClass.reactors[1] = reactor;
}
}
this.logger.info(`Reactor registered successfully.`);
reactor.emitter.on("stateChange", (data) => {