Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hbjydev
Copy link

@hbjydev hbjydev commented Mar 28, 2024

What this PR does:

This PR resolves an issue when trying to set the HTTPListenNetwork or GRPCListenNetwork config values to unix where a port would be appended to the file path, preventing the socket from being bound.

As an example, take this configuration:

server:
  http_listen_network: unix
  http_listen_address: /var/run/http.sock

This would lead to a listener being created for unix:///var/run/http.sock:80, including the default value for the HTTPListenPort, :80.

This PR adds a brief check to see if the network is unix and if so, removes the port from the address, leading to the correct address being bound (unix:///var/run/http.sock).

Which issue(s) this PR fixes:

Fixes #475

Checklist

  • Tests updated
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support listening on unix sockets

2 participants