mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
do not call value() on empty optional query_info
This commit is contained in:
parent
89bcebfe96
commit
8581bdbe58
@ -419,7 +419,11 @@ namespace
|
|||||||
void read(GRPCQueryInfo & query_info_, const CompletionCallback & callback) override
|
void read(GRPCQueryInfo & query_info_, const CompletionCallback & callback) override
|
||||||
{
|
{
|
||||||
if (!query_info.has_value())
|
if (!query_info.has_value())
|
||||||
|
{
|
||||||
callback(false);
|
callback(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
query_info_ = std::move(query_info).value();
|
query_info_ = std::move(query_info).value();
|
||||||
query_info.reset();
|
query_info.reset();
|
||||||
callback(true);
|
callback(true);
|
||||||
@ -486,7 +490,11 @@ namespace
|
|||||||
void read(GRPCQueryInfo & query_info_, const CompletionCallback & callback) override
|
void read(GRPCQueryInfo & query_info_, const CompletionCallback & callback) override
|
||||||
{
|
{
|
||||||
if (!query_info.has_value())
|
if (!query_info.has_value())
|
||||||
|
{
|
||||||
callback(false);
|
callback(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
query_info_ = std::move(query_info).value();
|
query_info_ = std::move(query_info).value();
|
||||||
query_info.reset();
|
query_info.reset();
|
||||||
callback(true);
|
callback(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user