Skip to content

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

Merged
brianc merged 1 commit into
brianc:masterfrom
booo:unix_sockets
Jan 21, 2013
Merged

fixing support for Unix sockets in native binding (rebased)#249
brianc merged 1 commit into
brianc:masterfrom
booo:unix_sockets

Conversation

@booo

@booo booo commented Jan 18, 2013

Copy link
Copy Markdown
Contributor

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

brianc commented Jan 21, 2013

Copy link
Copy Markdown
Owner

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

brianc commented Apr 21, 2015

Copy link
Copy Markdown
Owner

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
Copy Markdown

👍 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.

3 participants