File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -98,8 +98,6 @@ func WithConnectionString(connectionString string) Option {
9898}
9999
100100// WithConnectionTTL defines duration for parking idle connections
101- //
102- // Warning: if defined WithSessionPoolIdleThreshold - idleThreshold must be less than connectionTTL
103101func WithConnectionTTL (ttl time.Duration ) Option {
104102 return func (ctx context.Context , c * connection ) error {
105103 c .options = append (c .options , config .WithConnectionTTL (ttl ))
@@ -360,11 +358,11 @@ func WithSessionPoolKeepAliveMinSize(keepAliveMinSize int) Option {
360358}
361359
362360// WithSessionPoolIdleThreshold defines keep-alive interval for idle sessions
363- // Warning: if defined WithConnectionTTL - idleThreshold must be less than connectionTTL
364- //
365- // Deprecated: table client do not supports background session keep-aliving now
366361func WithSessionPoolIdleThreshold (idleThreshold time.Duration ) Option {
367- return func (ctx context.Context , c * connection ) error { return nil }
362+ return func (ctx context.Context , c * connection ) error {
363+ c .tableOptions = append (c .tableOptions , tableConfig .WithIdleThreshold (idleThreshold ))
364+ return nil
365+ }
368366}
369367
370368// WithSessionPoolKeepAliveTimeout set timeout of keep alive requests for session in table.Client
You can’t perform that action at this time.
0 commit comments