Skip to content

Commit

Permalink
fix: server crashed if clients send invalid frames
Browse files Browse the repository at this point in the history
For more information, see websockets/ws#1354

Closes #290
  • Loading branch information
jonasgloning authored Nov 4, 2022
1 parent d4b292d commit 4230c63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const createInstance = ({ app, server, options }: {
});

wss.on("connection", (client: IClient) => {

const messageQueue = realm.getMessageQueueById(client.getId());

if (messageQueue) {
Expand Down Expand Up @@ -72,4 +73,4 @@ export const createInstance = ({ app, server, options }: {

messagesExpire.startMessagesExpiration();
checkBrokenConnections.start();
};
};

0 comments on commit 4230c63

Please sign in to comment.