-
Notifications
You must be signed in to change notification settings - Fork 15
lab6-Jeremiah #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
lab6-Jeremiah #14
Conversation
|
||
|
||
socket.on('error', function(err){ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not handling your error event here. Something should go inside of this function.
README.md
Outdated
### Chat Features | ||
|
||
* @all triggers a broadcast event | ||
* @nickname allows a user change their nickname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server.js
Outdated
return; | ||
} | ||
|
||
socket.destroy(error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is causing your socket to close when a user enters a command that does not satisfy the condition of any of your if blocks. Instead you should continuing down to the default emitter on line 77. You should remove this line from here. You could put it in its own event.
No description provided.