Skip to content
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

fix blank lines being passed to parse message #318

Merged
merged 1 commit into from
Feb 18, 2015

Conversation

helderroem
Copy link

I was using this to interact with twitch irc and it kept crashing because the service occasionally sends a double line break at the end of a line, this was an easy fix but I'm not sure it's in the right place. Feel free to refuse it.

} catch (err) {
if (!self.conn.requestedDisconnect) {
throw err;
if (line.length > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best just to check the truthyness of line. The empty string will evaluate as false.

@jirwin
Copy link
Collaborator

jirwin commented Jan 25, 2015

Looks pretty good to me. Thanks!

@helderroem
Copy link
Author

You're right, updated it to just be a truth check. and thank you this module works great!

@ChadKeating
Copy link

Thank you for this fix.

@ghost
Copy link

ghost commented Feb 8, 2015

Why does this change the iconv implementation used? Can you add tests, and squash your commits into one as described in the contributing guide?

@ghost ghost added the needs-feedback label Feb 8, 2015
@helderroem
Copy link
Author

Sorry, continued working on the wrong branch. I've removed iconv-lite, added a test and squashed commits.

@jirwin
Copy link
Collaborator

jirwin commented Feb 18, 2015

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants