Jedis connection is not closed by the jedis.close() method -


i using redis storing data. when issue jedis.close() server, connection not closed, still showing in list of connections (e.g. client list command in redis still shows jedis connection). if server shutdown, connection ends in redis.

why doesn't jedis.close() method close connection? can explain behaviour?

i attached code snippet:

try {     genericobjectpoolconfig  poolconfig = new genericobjectpoolconfig();     poolconfig.setmaxtotal(max_active_pool);     poolconfig.setmaxidle(max_idle);     poolconfig.setminidle(min_idle);     pool = new jedispool(poolconfig, single_redis_ip, single_redis_ip_port, timeout, redis_password,redis_rdb_number);     jedis jedis = pool.getresource();     jedis.clientsetname("testredis");     system.out.println(jedis.smembers("apikey"));     system.out.println(jedis.get("apikey"));     if(jedis != null && jedis.isconnected())         jedis.close(); } catch(exception e) {     e.printstacktrace(); } 


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -