Skip to content

Commit

Permalink
Fix #11457: Use proxy-defaults protocol if service-defaults protocol …
Browse files Browse the repository at this point in the history
…is unset
  • Loading branch information
Mongey committed Mar 21, 2024
1 parent fea6926 commit c60968d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion agent/consul/discoverychain/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ func (c *compiler) recordNode(node *structs.DiscoveryGraphNode) {

func (c *compiler) recordServiceProtocol(sid structs.ServiceID) error {
if serviceDefault := c.entries.GetService(sid); serviceDefault != nil {
return c.recordProtocol(sid, serviceDefault.Protocol)
if serviceDefault.Protocol != "" {
return c.recordProtocol(sid, serviceDefault.Protocol)
}
}
if proxyDefault := c.entries.GetProxyDefaults(sid.PartitionOrDefault()); proxyDefault != nil {
if proxyDefault.Protocol != "" {
Expand Down

0 comments on commit c60968d

Please sign in to comment.