Skip to content

Commit

Permalink
Fix: set default scheme for resolver in tunnelclient
Browse files Browse the repository at this point in the history
  • Loading branch information
janekbaraniewski committed Jul 16, 2024
1 parent 6fce4f4 commit 0a97924
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/agent/tunnelserver/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ import (
"github.com/loft-sh/devpod/pkg/stdio"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/resolver"
)

func NewTunnelClient(reader io.Reader, writer io.WriteCloser, exitOnClose bool, exitCode int) (tunnel.TunnelClient, error) {
pipe := stdio.NewStdioStream(reader, writer, exitOnClose, exitCode)

// After moving from deprecated grpc.Dial to grpc.NewClient we need to setup resolver first
// https://github.com/grpc/grpc-go/issues/1786#issuecomment-2119088770
resolver.SetDefaultScheme("passthrough")

// Set up a connection to the server.
conn, err := grpc.NewClient("",
grpc.WithTransportCredentials(insecure.NewCredentials()),
Expand Down

0 comments on commit 0a97924

Please sign in to comment.