未验证 提交 f39c0dd2 编写于 作者: D Daming 提交者: GitHub

fix to release incorrectly lock when it is failed to obtain lock (#5610)

Co-authored-by: wu-sheng's avatar吴晟 Wu Sheng <wu.sheng@foxmail.com>
上级 a45f615b
......@@ -78,8 +78,8 @@ public class ConsumeDriver<T> implements IDriver {
if (running) {
return;
}
lock.lock();
try {
lock.lock();
this.allocateBuffer2Thread();
for (ConsumerThread consumerThread : consumerThreads) {
consumerThread.start();
......@@ -116,8 +116,8 @@ public class ConsumeDriver<T> implements IDriver {
@Override
public void close(Channels channels) {
lock.lock();
try {
lock.lock();
this.running = false;
for (ConsumerThread consumerThread : consumerThreads) {
consumerThread.shutdown();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册