Update grpc clients' keepalive interval (#1231)

Some reverse proxies might find 15s interval too short and respond with an enhance your-calm message

This change is setting the management and signal clients' keepalive interval to 30 seconds to minimize the number of reconnections
This commit is contained in:
Maycon Santos 2023-10-19 10:18:16 +02:00 committed by GitHub
parent c979a4e9fb
commit a9f5fad625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ func NewClient(ctx context.Context, addr string, ourPrivateKey wgtypes.Key, tlsE
transportOption,
grpc.WithBlock(),
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 15 * time.Second,
Time: 30 * time.Second,
Timeout: 10 * time.Second,
}))
if err != nil {

View File

@ -79,7 +79,7 @@ func NewClient(ctx context.Context, addr string, key wgtypes.Key, tlsEnabled boo
transportOption,
grpc.WithBlock(),
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 15 * time.Second,
Time: 30 * time.Second,
Timeout: 10 * time.Second,
}))