Skip to content

Commit

Permalink
Rectify the default values for keep-alive timeout (#1381)
Browse files Browse the repository at this point in the history
  • Loading branch information
taonic authored Feb 8, 2024
1 parent 72a5b6f commit 246a7d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,13 @@ type (
// After a duration of this time if the client doesn't see any activity it
// pings the server to see if the transport is still alive.
// If set below 10s, a minimum value of 10s will be used instead.
// default: 15s
// default: 30s
KeepAliveTime time.Duration

// After having pinged for keepalive check, the client waits for a duration
// of Timeout and if no activity is seen even after that the connection is
// closed.
// default: 30s
// default: 15s
KeepAliveTimeout time.Duration

// if true, when there are no active RPCs, Time and Timeout will be ignored and no
Expand Down
4 changes: 2 additions & 2 deletions internal/grpc_dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ const (
defaultMaxPayloadSize = 128 * mb

// defaultKeepAliveTime is the keep alive time if one is not specified.
defaultKeepAliveTime = 15 * time.Second
defaultKeepAliveTime = 30 * time.Second

// defaultKeepAliveTimeout is the keep alive timeout if one is not specified.
defaultKeepAliveTimeout = 30 * time.Second
defaultKeepAliveTimeout = 15 * time.Second
)

func dial(params dialParameters) (*grpc.ClientConn, error) {
Expand Down

0 comments on commit 246a7d2

Please sign in to comment.