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:
Hornwitser committed 2020-05-11 18:04:03 +02:00
1 parent ca2839594e
commit a194508f52
8 files changed
+108 -37

No files matched your search

+1 -8
View File
@@ -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", {