Merge pull request #961 from bbassie/feature/instance-host-broadcast

Deliver broadcasts to all hosts, not just the local one
This commit is contained in:
Cooldude2606 authored and GitHub committed 2026-08-08 23:51:48 +01:00
commit c0138c3fe0
4 files changed
+53 -2

No files matched your search

+6
View File
@@ -183,6 +183,12 @@ export class HostRouter {
if (this.host !== origin && (!plugin || this.host.serverPlugins.has(plugin))) {
this.host.connector.forward(message);
}
} else if (dst.id === lib.Address.host) {
// Sent up to the controller, which passes it on to the other
// hosts. Nothing left to do when it came from there.
if (this.host !== origin && (!plugin || this.host.serverPlugins.has(plugin))) {
this.host.connector.forward(message);
}
} else if (dst.id === lib.Address.control) {
if (this.host !== origin) {
if (!plugin || this.host.serverPlugins.has(plugin)) {
+10
View File
@@ -225,6 +225,16 @@ export class Link {
return;
}
// A broadcast is addressed to every link of the type it targets, so
// being addressed to this one does not mean it stops here.
if (
message.type === "event"
&& message.dst.type === libData.Address.broadcast
&& this.router
) {
this._routeMessage(message, entry);
}
if (message.type === "request") {
this._processRequest(
message as libData.MessageRequest,