-
Notifications
You must be signed in to change notification settings - Fork 388
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
Update normalizeConnectArgs to latest master #244
Conversation
Hi Linus, thank you for the contribution. This is actually a bug in Node 7.7.2 (nodejs/node#11761). We recommend you stick with 7.7.1 until that fix is published. |
Ahh, that's interesting, I was quite sure that it started working after I applied this patch 🤔 maybe I messed something else up... will check... |
options.host = args[1] | ||
} | ||
} | ||
|
||
var cb = args[args.length - 1] | ||
return typeof cb === 'function' ? [options, cb] : [options] | ||
return (typeof cb === 'function') ? [options, cb] : [options, null] |
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.
Your patch bypasses the Node bug by passing null
for the callback when no callback is provided instead of nothing. This just happens to be the one thing that Socket#connect
code does check for: https://github.com/nodejs/node/blob/v7.7.2/lib/net.js#L942.
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.
Haha, yeah that explains it then 😄
7.7.3 came out yesterday (https://nodejs.org/en/blog/release/v7.7.3/). Would you mind seeing if that version of node works for you? |
I'll check tomorrow 👌 |
Just checking in if you've had an opportunity to test the newer version of Node? |
Sorry totally forgot about this, yes it seems to be working in 7.7.3, thanks for the help 👏 |
Awesome! Glad it worked out. :) |
…ansaction errors. (newrelic#244)
…ansaction errors. (newrelic#244)
Fixes the following error with
pg
: