Skip to content

Commit 2c28fe2

Browse files
committed
remove deprecation warning for WithSessionPoolIdleThreshold
1 parent 69b67c9 commit 2c28fe2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

options.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff 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
103101
func 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
366361
func 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

0 commit comments

Comments
 (0)