#3839·jedis

BUG/连接泄漏:在 JedisSentineled/JedisSentinelPool 模式下,执行 close 方法时无法关闭 SentinelListener 连接

作者: peng-lin创建于 2024年5月17日更新于 2026年9月23日
标签bug

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