Skip to content

Commit

Permalink
chore: increase signal and management gRPC clients timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
braginini committed Oct 31, 2021
1 parent 673e807 commit e9066b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions management/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ func NewClient(ctx context.Context, addr string, ourPrivateKey wgtypes.Key, tlsE
transportOption = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))
}

mgmCtx, cancel := context.WithTimeout(ctx, 3*time.Second)
mgmCtx, cancel := context.WithTimeout(ctx, 10*time.Second)
defer cancel()
conn, err := grpc.DialContext(
mgmCtx,
addr,
transportOption,
grpc.WithBlock(),
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 3 * time.Second,
Timeout: 2 * time.Second,
Time: 15 * time.Second,
Timeout: 10 * time.Second,
}))

if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions signal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ func NewClient(ctx context.Context, addr string, key wgtypes.Key, tlsEnabled boo
transportOption = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))
}

sigCtx, cancel := context.WithTimeout(ctx, 3*time.Second)
sigCtx, cancel := context.WithTimeout(ctx, 10*time.Second)
defer cancel()
conn, err := grpc.DialContext(
sigCtx,
addr,
transportOption,
grpc.WithBlock(),
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 3 * time.Second,
Timeout: 2 * time.Second,
Time: 15 * time.Second,
Timeout: 10 * time.Second,
}))

if err != nil {
Expand Down

0 comments on commit e9066b4

Please sign in to comment.