mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Add try/catch in destructor
This commit is contained in:
parent
f9a9b02439
commit
262d4c6316
@ -37,7 +37,16 @@ LocalConnection::~LocalConnection()
|
||||
{
|
||||
/// Last query may not have been finished or cancelled due to exception on client side.
|
||||
if (state && !state->is_finished && !state->is_cancelled)
|
||||
sendCancel();
|
||||
{
|
||||
try
|
||||
{
|
||||
LocalConnection::sendCancel();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
/// Just ignore any exception.
|
||||
}
|
||||
}
|
||||
state.reset();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user