From 41aa6314faf4d2f5c9164c6977c773c2edfa0f15 Mon Sep 17 00:00:00 2001 From: Easwar Swaminathan Date: Fri, 25 Aug 2023 02:46:11 +0000 Subject: [PATCH] grpc: re-enable channel idleness by default --- dialoptions.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dialoptions.go b/dialoptions.go index 1fd0d5c127f4..5077e77c918d 100644 --- a/dialoptions.go +++ b/dialoptions.go @@ -644,6 +644,7 @@ func defaultDialOptions() dialOptions { UseProxy: true, }, recvBufferPool: nopBufferPool{}, + idleTimeout: 30 * time.Minute, } } @@ -680,8 +681,8 @@ func WithResolvers(rs ...resolver.Builder) DialOption { // channel will exit idle mode when the Connect() method is called or when an // RPC is initiated. // -// By default this feature is disabled, which can also be explicitly configured -// by passing zero to this function. +// A default timeout of 30 min will be used if this dial option is not set at +// dial time and idleness can be disabled by passing a timeout of zero. // // # Experimental //