diff --git a/src/main/java/redis/clients/jedis/JedisPool.java b/src/main/java/redis/clients/jedis/JedisPool.java index d63de39b89..0f4fe4b33e 100644 --- a/src/main/java/redis/clients/jedis/JedisPool.java +++ b/src/main/java/redis/clients/jedis/JedisPool.java @@ -48,17 +48,12 @@ public JedisFactory(final String host, final int port, super(); this.host = host; this.port = port; - this.timeout = (timeout > 0) ? timeout : -1; + this.timeout = timeout; this.password = password; } public Object makeObject() throws Exception { - final Jedis jedis; - if (timeout > 0) { - jedis = new Jedis(this.host, this.port, this.timeout); - } else { - jedis = new Jedis(this.host, this.port); - } + final Jedis jedis = new Jedis(this.host, this.port, this.timeout); jedis.connect(); if (null != this.password) {