Merge pull request #26079 from ClickHouse/fix_abort

Fix abort in ZooKeeper client
This commit is contained in:
alesapin 2021-07-08 22:58:28 +03:00 committed by GitHub
commit c34a769143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -853,6 +853,7 @@ void ZooKeeper::finalize(bool error_send, bool error_receive)
}
/// Send thread will exit after sending close request or on expired flag
if (send_thread.joinable())
send_thread.join();
}
@ -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();
{