Add try/catch in destructor

This commit is contained in:
Kruglov Pavel 2023-08-01 16:44:46 +02:00 committed by GitHub
parent f9a9b02439
commit 262d4c6316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}