mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 15:33:12 +09:00
Add connection events for control connections
Add hooks for plugins to be able to handle connection state changes for control connections on the master server and in the web interface.
This commit is contained in:
1 parent
de629d9416
commit
0a6e26bb2d
3 files changed
+89
No files matched your search
@@ -696,6 +696,14 @@ class ControlConnection extends BaseConnection {
|
||||
debugEvents.off("message", this.ws_dumper);
|
||||
}
|
||||
});
|
||||
|
||||
for (let event of ["connect", "drop", "resume", "close"]) {
|
||||
this.connector.on(event, () => {
|
||||
for (let masterPlugin of masterPlugins.values()) {
|
||||
masterPlugin.onControlConnectionEvent(this, event);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async getMasterConfigRequestHandler() {
|
||||
|
||||
Reference in new issue
Block a user