mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 15:24:52 +09:00
Deliver broadcasts to all hosts, not just the local one
An event broadcast from an instance to all hosts only reached the host running that instance. The host side of an instance connection has the host's own address as its source, so a broadcast aimed at hosts counts as addressed to it, and a link that a message is addressed to handles it and stops. The event was delivered locally and never routed onwards. A broadcast is addressed to every link of the type it targets, so arriving at one of them does not mean it has arrived everywhere. Keep routing such a message after handling it locally. Only links that route are affected, as instances and controls have no router and would otherwise throw on every broadcast they receive. The only links whose source type matches a broadcast target and which route are the host and its instance connections, both matching a broadcast to hosts, so add the missing case for that to the host router. It forwards to the controller, which already passes broadcasts on to every other host, and stops when the message came from the controller to begin with. Drop the exclusion this bug had in the routing test matrix, which now covers it along with the plugin filtering variants. Fixes #575 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5e0ab3423f
commit
09c667252c
4 files changed
+52
-2
No files matched your search
@@ -235,8 +235,6 @@ describe("Integration of link routing", function() {
|
||||
};
|
||||
for (const dstName of dsts[dst]) {
|
||||
if (srcName === dstName) { continue; }
|
||||
// TODO remove when broadcasting from instance to hosts is fixed, see #575
|
||||
if (srcName === "instanceA1" && dstName === "hostB") { continue; }
|
||||
let called;
|
||||
handle(get(dstName), Event, async () => { called = true; });
|
||||
const should = canReach(dstName);
|
||||
|
||||
Reference in new issue
Block a user