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

fixing support for Unix sockets in native binding (rebased) #249

Merged
merged 1 commit into from
Jan 21, 2013

Conversation

booo
Copy link
Contributor

@booo booo commented Jan 18, 2013

Binding natively connections to Unix sockets failed due to DNS lookups applied on pathname to Unix socket's folder.

I rebased the commit to the master branch. You should be able to merge this now.

Belongs to #179

Binding natively connections to Unix sockets failed due to DNS lookups applied on pathname to Unix socket's folder.
brianc added a commit that referenced this pull request Jan 21, 2013
fixing support for Unix sockets in native binding (rebased)
@brianc brianc merged commit bd02375 into brianc:master Jan 21, 2013
@brianc
Copy link
Owner

brianc commented Jan 21, 2013

This looks good! I'm working on refactoring the connection parameters into a reusable class for both native & pure javascript to use...I'll be sure to add tests & coverage for this scenario.

@brianc
Copy link
Owner

brianc commented Apr 21, 2015

Oh nice catch! sorry 'bout that

On Mon, Apr 20, 2015 at 2:07 PM, redaktor notifications@github.com wrote:

@booo https://github.com/booo [and cc. brianc] This looks anything else
than "good" - sorry, but the code will never be fired:

if (!config.host.indexOf("/"))

You can't compare an indexOf with a simple '!' -
If the slash is not found indexOf returns -1`which is a negative integer
but not false.
You need an additional tilde symbol !!!

I will do a pull request to fix it in 2-10 minutes ;)

if (!~config.host.indexOf("/"))

Meanwhile @booo https://github.com/booo could read
http://stackoverflow.com/questions/18347033/how-to-shorten-my-conditional-statements/18347047#answer-18347047


Reply to this email directly or view it on GitHub
#249 (comment).

@redaktor
Copy link

👍 Sorry,
new to this – It's a minor issue for me now:
I overlooked the pg.connect object notation doc.
Seems more elegant to me anyway and everything is fine when I connect to

{
  host: '/foos_uberspacesocket'
}

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

Successfully merging this pull request may close these issues.

None yet

3 participants