#3839·jedis

BUG/Connection Leak:cannot close SentinelListener connection in a JedisSentineled/JedisSentinelPool mode when executing method close

Author: peng-linCreated May 17, 2024Updated Sep 23, 2026
Labelsbug

Expected behavior

Close sentinelListener when excuting method jedisSentineled.close().

Actual behavior

Cannot close sentinelListener thread

Steps to reproduce:

Please create a reproducible case of your problem. Make sure that case repeats consistently and it's not random

  1. init JedisSentineled object and close it immediately in a while true loop or in a multi-threaded concurrent environment
  2. Root Cause:concurrent problems;thread safety
problem-0

problem-1

problem-2

Redis / Jedis Configuration

Jedis version: all exists this bug

Redis version:

Java version:

how to resolve:

see the pictures

resolve