mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-21 15:51:43 +02:00
#538 prevent destructors from throwing exceptions
This commit is contained in:
@@ -64,15 +64,22 @@ HTTPSession::HTTPSession(const StreamSocket& socket, bool keepAlive):
|
||||
|
||||
HTTPSession::~HTTPSession()
|
||||
{
|
||||
if (_pBuffer) HTTPBufferAllocator::deallocate(_pBuffer, HTTPBufferAllocator::BUFFER_SIZE);
|
||||
try
|
||||
{
|
||||
close();
|
||||
if (_pBuffer) HTTPBufferAllocator::deallocate(_pBuffer, HTTPBufferAllocator::BUFFER_SIZE);
|
||||
try
|
||||
{
|
||||
close();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
delete _pException;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
poco_unexpected();
|
||||
}
|
||||
delete _pException;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user