mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-28 12:03:33 +00:00
fix: race on warned flag in versioncheck pkg, make consistent use of client/server terms
This commit is contained in:
@@ -8,11 +8,11 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/psviderski/uncloud/internal/cli/config"
|
||||
"github.com/psviderski/uncloud/internal/grpcversion"
|
||||
"github.com/psviderski/uncloud/internal/machine/constants"
|
||||
"github.com/psviderski/uncloud/internal/machine/network"
|
||||
"github.com/psviderski/uncloud/internal/machine/network/tunnel"
|
||||
"github.com/psviderski/uncloud/pkg/client"
|
||||
"github.com/psviderski/uncloud/pkg/versioncheck"
|
||||
"golang.org/x/net/proxy"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
@@ -71,8 +71,8 @@ func (c *WireGuardConnector) Connect(ctx context.Context) (*grpc.ClientConn, err
|
||||
grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) {
|
||||
return c.tun.DialContext(ctx, "tcp", addr)
|
||||
}),
|
||||
grpc.WithUnaryInterceptor(versioncheck.ClientUnaryInterceptor),
|
||||
grpc.WithStreamInterceptor(versioncheck.ClientStreamInterceptor),
|
||||
grpc.WithUnaryInterceptor(grpcversion.ClientUnaryInterceptor),
|
||||
grpc.WithStreamInterceptor(grpcversion.ClientStreamInterceptor),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("connect to machine API through WireGuard tunnel: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user