mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
fix tests
This commit is contained in:
parent
298de7813e
commit
8a078b9d71
@ -355,32 +355,9 @@ void Connection::disconnect()
|
||||
LOG_DEBUG(getLogger("Connection::disconnect"), "begin");
|
||||
in = nullptr;
|
||||
last_input_packet_type.reset();
|
||||
std::exception_ptr finalize_exception;
|
||||
|
||||
try
|
||||
{
|
||||
// finalize() can write and throw an exception.
|
||||
if (maybe_compressed_out)
|
||||
maybe_compressed_out->finalize();
|
||||
|
||||
if (out)
|
||||
out->finalize();
|
||||
|
||||
if (socket)
|
||||
socket->close();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
/// Don't throw an exception here, it will leave Connection in invalid state.
|
||||
finalize_exception = std::current_exception();
|
||||
|
||||
// no point to finalize tcp connections
|
||||
cancel();
|
||||
}
|
||||
|
||||
reset();
|
||||
|
||||
if (finalize_exception)
|
||||
std::rethrow_exception(finalize_exception);
|
||||
|
||||
LOG_DEBUG(getLogger("Connection::disconnect"), "end");
|
||||
}
|
||||
|
@ -45,10 +45,6 @@ void WriteBufferFromHTTPServerResponse::startSendHeaders()
|
||||
/// data, so "Connection: close" should be sent.
|
||||
response.setKeepAlive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
setFixedLength(response.getContentLength());
|
||||
}
|
||||
|
||||
if (add_cors_header)
|
||||
response.set("Access-Control-Allow-Origin", "*");
|
||||
|
Loading…
Reference in New Issue
Block a user