mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 01:41:59 +00:00
Handle exception in finalize inside WriteBufferFromPocoSocket destructor
This commit is contained in:
parent
57b8e74cea
commit
20007504a7
@ -106,7 +106,22 @@ WriteBufferFromPocoSocket::WriteBufferFromPocoSocket(Poco::Net::Socket & socket_
|
|||||||
|
|
||||||
WriteBufferFromPocoSocket::~WriteBufferFromPocoSocket()
|
WriteBufferFromPocoSocket::~WriteBufferFromPocoSocket()
|
||||||
{
|
{
|
||||||
finalize();
|
#ifndef NDEBUG
|
||||||
|
if (!finalized)
|
||||||
|
{
|
||||||
|
LOG_ERROR(log, "WriteBufferFromPocoSocket is not finalized in destructor. It's a bug");
|
||||||
|
std::terminate();
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
try
|
||||||
|
{
|
||||||
|
finalize();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
tryLogCurrentException(__PRETTY_FUNCTION__);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user