Fix bug that produced an unhandled error when a client sent invalid data

master
Sven Slootweg 7 years ago
parent ecb3b51bec
commit a85ca2d1e8

@ -45,12 +45,12 @@ module.exports = function createClientStore(options = {}) {
message = JSON.parse(data);
} catch (err) {
/* User sent invalid data; disconnect them. */
return this.killClient(client);
return this.kill(client);
}
if (message == null || typeof message !== "object") {
/* User sent invalid data; disconnect them. */
return this.killClient(client);
return this.kill(client);
}
if (message.type === "subscribe") {

Loading…
Cancel
Save