mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 16:23:12 +09:00
Filter plugin messages forwarded to links
Drop events forwarded to a slave or instance that does not have the plugin the event is defined in. Reject requests for the same reason.
This commit is contained in:
1 parent
ca2839594e
commit
a194508f52
8 files changed
+108
-37
No files matched your search
@@ -155,13 +155,6 @@ class WebSocketClientConnector extends WebSocketBaseConnector {
|
||||
this._reconnectDelay = reconnectDelay;
|
||||
this._timeout = 15 * 60;
|
||||
this._startedReconnect = null;
|
||||
|
||||
/**
|
||||
* Mapping of plugin name to plugin version loaded on the master
|
||||
* server. Is `null` before handshake has taken place.
|
||||
* @member {?Object<string, string>}
|
||||
*/
|
||||
this.plugins = null;
|
||||
}
|
||||
|
||||
_check(expectedStates) {
|
||||
@@ -363,7 +356,7 @@ class WebSocketClientConnector extends WebSocketBaseConnector {
|
||||
let { seq, type, data } = message;
|
||||
if (type == 'hello') {
|
||||
console.log(`SOCKET | received hello from master version ${data.version}`);
|
||||
this.plugins = data.plugins;
|
||||
this.emit("hello", data);
|
||||
if (this._sessionToken) {
|
||||
console.log("SOCKET | Attempting resume");
|
||||
this.sendHandshake("resume", {
|
||||
|
||||
Reference in new issue
Block a user