Try to fix deadlock in ZooKeeper client

This commit is contained in:
Alexander Tokmakov 2023-06-29 00:41:23 +03:00 committed by GitHub
parent 2653b9c808
commit 45232770e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,6 +362,16 @@ ZooKeeper::ZooKeeper(
{
tryLogCurrentException(log, "Failed to connect to ZooKeeper");
try
{
requests_queue.finish();
socket.shutdown();
}
catch (...)
{
tryLogCurrentException(log);
}
send_thread.join();
receive_thread.join();