mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #26079 from ClickHouse/fix_abort
Fix abort in ZooKeeper client
This commit is contained in:
commit
c34a769143
@ -853,7 +853,8 @@ void ZooKeeper::finalize(bool error_send, bool error_receive)
|
||||
}
|
||||
|
||||
/// Send thread will exit after sending close request or on expired flag
|
||||
send_thread.join();
|
||||
if (send_thread.joinable())
|
||||
send_thread.join();
|
||||
}
|
||||
|
||||
/// Set expired flag after we sent close event
|
||||
@ -870,7 +871,7 @@ void ZooKeeper::finalize(bool error_send, bool error_receive)
|
||||
tryLogCurrentException(__PRETTY_FUNCTION__);
|
||||
}
|
||||
|
||||
if (!error_receive)
|
||||
if (!error_receive && receive_thread.joinable())
|
||||
receive_thread.join();
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user