nonbinaryprogrammer commented on a change in pull request #6961:
URL: https://github.com/apache/geode/pull/6961#discussion_r725314438
##########
File path:
geode-for-redis/src/main/java/org/apache/geode/redis/internal/netty/NettyRedisServer.java
##########
@@ -102,10 +106,21 @@ public NettyRedisServer(Supplier<DistributionConfig>
configSupplier,
this.member = member;
this.securityService = securityService;
- if (port < RANDOM_PORT_INDICATOR) {
- throw new IllegalArgumentException(
- "The geode-for-redis-port cannot be less than " +
RANDOM_PORT_INDICATOR);
+ int tempTimeout;
+ // get connect timeout from system property
+ tempTimeout = Integer.getInteger(RedisConstants.CONNECT_TIMEOUT_MILLIS,
+ DEFAULT_REDIS_CONNECT_TIMEOUT_MILLIS);
+ if (tempTimeout <= 0) {
+ tempTimeout = DEFAULT_REDIS_CONNECT_TIMEOUT_MILLIS;
+ }
+ this.connectTimeoutMillis = tempTimeout;
+
+ // get write timeout from system property
+ tempTimeout = Integer.getInteger(WRITE_TIMEOUT_SECONDS,
DEFAULT_REDIS_WRITE_TIMEOUT_SECONDS);
+ if (tempTimeout <= 0) {
+ tempTimeout = DEFAULT_REDIS_WRITE_TIMEOUT_SECONDS;
}
+ this.writeTimeoutSeconds = tempTimeout;
Review comment:
actually, I take that back, validation isn't an issue. I'll do this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]