Fix failed user authentication

This commit is contained in:
Chris Blanchard 2015-10-18 16:29:47 +01:00
parent cf2fae0a42
commit a3d6bc4f9d

View file

@ -73,7 +73,7 @@ module.exports = namespace => {
User.find(id, (error, user) => {
if (error) {
winston.error(error);
return next(new Error("Authentication failed"));
return null;
}
socket._user = user;
winston.info("Logged in:", user.username, user.id);