Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/grpc/server/adapters/cowboy.ex
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ defmodule GRPC.Server.Adapters.Cowboy do
:undefined ->
raise "undefined address for ranch server"

:local ->
Copy link
Contributor

Choose a reason for hiding this comment

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

As with the other PR, please add tests for the change.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe when using :local, the handling of the address would be a bit different as it needs the socket file returned in port to decide which is the unix file descriptor handling the connection

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, seeing as this is only used in logs, we can perhaps add that info to Logger.metadata and return "local" as it is now.

"local"

addr ->
"#{:inet.ntoa(addr)}:#{port}"
end
Expand Down