mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 23:30:41 +09:00
Pass the event name to web controllerConnectionEvent handlers (#1085)
The web interface registered the hook's listener directly on the connector, so handlers got the connector's emit arguments (the hello data for connect, nothing for the rest) instead of the event name. Fixes #1083 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e0755cb4ee
commit
6f6795dc1f
1 file changed
+1
-1
@@ -106,7 +106,7 @@ export class Control extends lib.Link {
|
||||
});
|
||||
|
||||
for (let event of ["connect", "drop", "resume", "close"] as const) {
|
||||
this.connector.on(event, this.hooks.controllerConnectionEvent.listener);
|
||||
this.connector.on(event, () => this.hooks.controllerConnectionEvent.invoke(event));
|
||||
}
|
||||
|
||||
this.handle(lib.AccountUpdateEvent, this.handleAccountUpdateEvent.bind(this));
|
||||
|
||||
Reference in new issue
Block a user