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