fix: race on warned flag in versioncheck pkg, make consistent use of client/server terms

This commit is contained in:
Pasha Sviderski
2026-04-08 20:42:27 +10:00
parent 883f184e37
commit ab644f6a47
8 changed files with 122 additions and 138 deletions
+3 -3
View File
@@ -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)