Default Lettuce shutdownQuietPeriod to zero.
Use a lower timeout for faster shutdown. Also, the quiet period is no longer configured through the shutdown timeout. Closes #2945
This commit is contained in:
@@ -51,7 +51,7 @@ class DefaultLettuceClientConfiguration implements LettuceClientConfiguration {
|
||||
DefaultLettuceClientConfiguration(boolean useSsl, SslVerifyMode verifyMode, boolean startTls,
|
||||
@Nullable ClientResources clientResources, @Nullable ClientOptions clientOptions, @Nullable String clientName,
|
||||
@Nullable ReadFrom readFrom, @Nullable RedisCredentialsProviderFactory redisCredentialsProviderFactory,
|
||||
Duration timeout, Duration shutdownTimeout, @Nullable Duration shutdownQuietPeriod) {
|
||||
Duration timeout, Duration shutdownTimeout, Duration shutdownQuietPeriod) {
|
||||
|
||||
this.useSsl = useSsl;
|
||||
this.verifyMode = verifyMode;
|
||||
@@ -63,7 +63,7 @@ class DefaultLettuceClientConfiguration implements LettuceClientConfiguration {
|
||||
this.redisCredentialsProviderFactory = Optional.ofNullable(redisCredentialsProviderFactory);
|
||||
this.timeout = timeout;
|
||||
this.shutdownTimeout = shutdownTimeout;
|
||||
this.shutdownQuietPeriod = shutdownQuietPeriod != null ? shutdownQuietPeriod : shutdownTimeout;
|
||||
this.shutdownQuietPeriod = shutdownQuietPeriod;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -185,7 +185,7 @@ public interface LettuceClientConfiguration {
|
||||
@Nullable RedisCredentialsProviderFactory redisCredentialsProviderFactory;
|
||||
Duration timeout = Duration.ofSeconds(RedisURI.DEFAULT_TIMEOUT);
|
||||
Duration shutdownTimeout = Duration.ofMillis(100);
|
||||
@Nullable Duration shutdownQuietPeriod;
|
||||
Duration shutdownQuietPeriod = Duration.ZERO;
|
||||
|
||||
LettuceClientConfigurationBuilder() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user