Skip to content

Do not look for a port in a Unix socket domain path #470

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

Merged
merged 1 commit into from
Oct 3, 2019

Conversation

Lawouach
Copy link
Contributor

@Lawouach Lawouach commented Aug 6, 2019

Contributes to #419

Signed-off-by: Sylvain Hellegouarch [email protected]

@Lawouach
Copy link
Contributor Author

Lawouach commented Aug 9, 2019

A gentle nudge, just to see if there is life on this project? :)

if hostspec.startswith('/'):
hosts.append(hostspec)
# keep sequence ordering
hostlist_ports.append(5432)
Copy link
Member

Choose a reason for hiding this comment

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

This is wrong. Socket paths still have to take the port into consideration. Use port or default_port[i] here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well default_port at that index might not exist, right?

Copy link
Member

Choose a reason for hiding this comment

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

The length of the default_port list is guaranteed to be the same as the number of specified hosts. See _validate_port_spec

Copy link
Member

Choose a reason for hiding this comment

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

Simply replace

addr, _, hostspec_port = hostspec.partition(':')

with

if not hostspec.startswith('/'):
    addr, _, hostspec_port = hostspec.partition(':')
else:
    addr = hostspec
    hostspec_port = ''

@Lawouach
Copy link
Contributor Author

Happy to squash if that makes the review simpler. Not sure your preferred process.

@elprans
Copy link
Member

elprans commented Aug 19, 2019

Please squash. Thanks!

Contributes to MagicStack#419

Signed-off-by: Sylvain Hellegouarch <[email protected]>
@Lawouach
Copy link
Contributor Author

Hi @elprans, I can appreciate you are quite busy but any visibility on a potential new release? Just to plan accordingly :)

@elprans
Copy link
Member

elprans commented Sep 26, 2019

Hi @Lawouach, I'll make a release next week.

@Lawouach
Copy link
Contributor Author

Woo ooh! Awesome! Thanks.

@elprans elprans merged commit b773912 into MagicStack:master Oct 3, 2019
@gvbgduh
Copy link

gvbgduh commented Oct 9, 2019

fantastic!

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