chore cleanup

This commit is contained in:
Benjamin Wegener
2024-04-02 23:30:37 +00:00
parent a12d7f3343
commit ed6a254bbb
2 changed files with 5 additions and 4 deletions

View File

@@ -4,8 +4,8 @@ export default class WetSock {
#clients = new Map();
#plugins = new Map();
constructor(config) {
this.config = config;
this.server = null;
this.#config = config;
this.#server = null;
}
start(server) {
@@ -36,7 +36,6 @@ export default class WetSock {
if(plugin.onMessage(ws.data.clientId, message)) break; // plugin consumes message by returning a truthy value
}
}
handleOpen(ws) {
const client = this.#clients.get(ws.data.clientId);
this.#plugins.forEach((plugin) => plugin.onOpen(ws.data.clientId));