mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-25 19:20:52 +00:00
Better exception safety for SourceFromInputStream.
This commit is contained in:
parent
b2a3835195
commit
f5e20027a7
@ -63,7 +63,20 @@ IProcessor::Status SourceFromInputStream::prepare()
|
|||||||
void SourceFromInputStream::work()
|
void SourceFromInputStream::work()
|
||||||
{
|
{
|
||||||
if (!is_generating_finished)
|
if (!is_generating_finished)
|
||||||
return ISource::work();
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ISource::work();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
/// Won't read suffix in case of exception.
|
||||||
|
is_stream_finished = true;
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_stream_finished)
|
if (is_stream_finished)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user